Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARK-2481: The environment variables SPARK_HISTORY_OPTS is covered in spark-env.sh #1341

Closed
wants to merge 2 commits into from

Conversation

witgo
Copy link
Contributor

@witgo witgo commented Jul 9, 2014

No description provided.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16460/

@witgo
Copy link
Contributor Author

witgo commented Jul 9, 2014

Jenkins, retest this please.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16463/

@vanzin
Copy link
Contributor

vanzin commented Jul 9, 2014

Is there a specific issue you're trying to fix here? sbin/spark-daemon.sh, which is called from the scripts you mention, already load that file.

@witgo
Copy link
Contributor Author

witgo commented Jul 10, 2014

if [ $# != 0 ]; then
  echo "Using command line arguments for setting the log directory is deprecated. Please "
  echo "set the spark.history.fs.logDirectory configuration option instead."
  export SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS -Dspark.history.fs.logDirectory=$1"
fi

exec "$sbin"/spark-daemon.sh start org.apache.spark.deploy.history.HistoryServer 1

Before export SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS -Dspark.history.fs.logDirectory=$1" execution should load spark-env.sh

@vanzin
Copy link
Contributor

vanzin commented Jul 10, 2014

I'd rather do it differently in that case, if you really care about it. Instead of loading spark-env.sh, do this:

CMD_LINE_ARGS=
if [ $# != 0 ]; then
  # print warning
  CMD_LINE_ARGS="--dir $1"
fi

exec spark-daemon.sh .... $CMD_LINE_ARGS

This restores the previous behaviour while still warning the user.

@vanzin
Copy link
Contributor

vanzin commented Jul 10, 2014

Also, as a general comment, it's nice when the PR summary/description explain the problem being solved (not just what the patch is doing).

@witgo
Copy link
Contributor Author

witgo commented Jul 10, 2014

Use load-spark-env.sh to ensure spark-env.sh loads only once. start-master.sh did the same.

@witgo witgo changed the title *-history-server.sh load spark-env.sh The environment variables SPARK_HISTORY_OPTS is covered in spark-env.sh Jul 10, 2014
@vanzin
Copy link
Contributor

vanzin commented Jul 11, 2014

LGTM.

@witgo witgo changed the title The environment variables SPARK_HISTORY_OPTS is covered in spark-env.sh SPARK-2481: The environment variables SPARK_HISTORY_OPTS is covered in spark-env.sh Jul 15, 2014
@tsudukim
Copy link
Contributor

Looks good, but this patch seems to includes some unrelated diffs to SPARK-2481.

  • conf/spark-env.sh.template
  • docs/spark-standalone.md
  • sbin/spark-config.sh

@SparkQA
Copy link

SparkQA commented Jul 17, 2014

QA tests have started for PR 1341. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16778/consoleFull

@SparkQA
Copy link

SparkQA commented Jul 17, 2014

QA results for PR 1341:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16778/consoleFull

@witgo
Copy link
Contributor Author

witgo commented Aug 3, 2014

@pwendell I think the PR can be merged into 1.1

@SparkQA
Copy link

SparkQA commented Aug 3, 2014

QA tests have started for PR 1341. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17796/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 3, 2014

QA results for PR 1341:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17796/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 3, 2014

QA tests have started for PR 1341. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17798/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 3, 2014

QA results for PR 1341:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17798/consoleFull

@@ -22,4 +22,7 @@
sbin=`dirname "$0"`
sbin=`cd "$sbin"; pwd`

. "$sbin/spark-config.sh"
. "$SPARK_PREFIX/bin/load-spark-env.sh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you don't need to change this file, since we're not using any environment variables here. Also, spark-daemon.sh actually already does this.

@andrewor14
Copy link
Contributor

@witgo pending 1 more comment this LGTM

@witgo
Copy link
Contributor Author

witgo commented Aug 26, 2014

@andrewor14 done

@asfgit asfgit closed this in 9f04db1 Aug 26, 2014
asfgit pushed a commit that referenced this pull request Aug 26, 2014
…n spark-env.sh

Author: witgo <witgo@qq.com>
Author: GuoQiang Li <witgo@qq.com>

Closes #1341 from witgo/history_env and squashes the following commits:

b4fd9f8 [GuoQiang Li] review commit
0ebe401 [witgo] *-history-server.sh load spark-config.sh

(cherry picked from commit 9f04db1)
Signed-off-by: Andrew Or <andrewor14@gmail.com>
@andrewor14
Copy link
Contributor

Thanks I merged this into master and 1.1

@witgo witgo deleted the history_env branch August 26, 2014 02:42
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
…n spark-env.sh

Author: witgo <witgo@qq.com>
Author: GuoQiang Li <witgo@qq.com>

Closes apache#1341 from witgo/history_env and squashes the following commits:

b4fd9f8 [GuoQiang Li] review commit
0ebe401 [witgo] *-history-server.sh load spark-config.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants