You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2015/01/26 00:20:53 UTC

spark git commit: SPARK-5382: Use SPARK_CONF_DIR in spark-class and spark-submit, spark-su...

Repository: spark
Updated Branches:
  refs/heads/branch-1.2 7652809be -> e82e9601c


SPARK-5382: Use SPARK_CONF_DIR in spark-class and spark-submit, spark-su...

...bmit2.cmd if it is defined

Author: Jacek Lewandowski <le...@gmail.com>

Closes #4177 from jacek-lewandowski/SPARK-5382-1.2 and squashes the following commits:

41cef25 [Jacek Lewandowski] SPARK-5382: Use SPARK_CONF_DIR in spark-class and spark-submit, spark-submit2.cmd if it is defined


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e82e9601
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e82e9601
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e82e9601

Branch: refs/heads/branch-1.2
Commit: e82e9601ce68978335d97e08f3cb690313cc1064
Parents: 7652809
Author: Jacek Lewandowski <le...@gmail.com>
Authored: Sun Jan 25 15:20:50 2015 -0800
Committer: Andrew Or <an...@databricks.com>
Committed: Sun Jan 25 15:20:50 2015 -0800

----------------------------------------------------------------------
 bin/spark-submit      | 4 +++-
 bin/spark-submit2.cmd | 7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e82e9601/bin/spark-submit
----------------------------------------------------------------------
diff --git a/bin/spark-submit b/bin/spark-submit
index aefd38a..216b92e 100755
--- a/bin/spark-submit
+++ b/bin/spark-submit
@@ -20,6 +20,8 @@
 # NOTE: Any changes in this file must be reflected in SparkSubmitDriverBootstrapper.scala!
 
 export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
+export SPARK_CONF_DIR="${SPARK_CONF_DIR:-"$SPARK_HOME/conf"}"
+
 ORIG_ARGS=("$@")
 
 # Set COLUMNS for progress bar
@@ -44,7 +46,7 @@ while (($#)); do
   shift
 done
 
-DEFAULT_PROPERTIES_FILE="$SPARK_HOME/conf/spark-defaults.conf"
+DEFAULT_PROPERTIES_FILE="$SPARK_CONF_DIR/spark-defaults.conf"
 if [ "$MASTER" == "yarn-cluster" ]; then
   SPARK_SUBMIT_DEPLOY_MODE=cluster
 fi

http://git-wip-us.apache.org/repos/asf/spark/blob/e82e9601/bin/spark-submit2.cmd
----------------------------------------------------------------------
diff --git a/bin/spark-submit2.cmd b/bin/spark-submit2.cmd
index daf0284..4581264 100644
--- a/bin/spark-submit2.cmd
+++ b/bin/spark-submit2.cmd
@@ -24,13 +24,18 @@ set ORIG_ARGS=%*
 
 rem Reset the values of all variables used
 set SPARK_SUBMIT_DEPLOY_MODE=client
-set SPARK_SUBMIT_PROPERTIES_FILE=%SPARK_HOME%\conf\spark-defaults.conf
 set SPARK_SUBMIT_DRIVER_MEMORY=
 set SPARK_SUBMIT_LIBRARY_PATH=
 set SPARK_SUBMIT_CLASSPATH=
 set SPARK_SUBMIT_OPTS=
 set SPARK_SUBMIT_BOOTSTRAP_DRIVER=
 
+if not "x%SPARK_CONF_DIR%"=="x" (
+  set SPARK_SUBMIT_PROPERTIES_FILE=%SPARK_CONF_DIR%\spark-defaults.conf
+) else (
+  set SPARK_SUBMIT_PROPERTIES_FILE=%SPARK_HOME%\conf\spark-defaults.conf
+)
+
 :loop
 if [%1] == [] goto continue
   if [%1] == [--deploy-mode] (


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org