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:15:41 UTC

spark git commit: SPARK-5382: Use SPARK_CONF_DIR in spark-class if it is defined

Repository: spark
Updated Branches:
  refs/heads/master 383425ab7 -> 1c30afdf9


SPARK-5382: Use SPARK_CONF_DIR in spark-class if it is defined

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

Closes #4179 from jacek-lewandowski/SPARK-5382-1.3 and squashes the following commits:

55d7791 [Jacek Lewandowski] SPARK-5382: Use SPARK_CONF_DIR in spark-class 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/1c30afdf
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1c30afdf
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1c30afdf

Branch: refs/heads/master
Commit: 1c30afdf94b27e1ad65df0735575306e65d148a1
Parents: 383425a
Author: Jacek Lewandowski <le...@gmail.com>
Authored: Sun Jan 25 15:15:09 2015 -0800
Committer: Andrew Or <an...@databricks.com>
Committed: Sun Jan 25 15:15:09 2015 -0800

----------------------------------------------------------------------
 bin/spark-class | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1c30afdf/bin/spark-class
----------------------------------------------------------------------
diff --git a/bin/spark-class b/bin/spark-class
index 1b94546..2f0441b 100755
--- a/bin/spark-class
+++ b/bin/spark-class
@@ -29,6 +29,7 @@ FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
 
 # Export this as SPARK_HOME
 export SPARK_HOME="$FWDIR"
+export SPARK_CONF_DIR="${SPARK_CONF_DIR:-"$SPARK_HOME/conf"}"
 
 . "$FWDIR"/bin/load-spark-env.sh
 
@@ -120,8 +121,8 @@ fi
 JAVA_OPTS="$JAVA_OPTS -Xms$OUR_JAVA_MEM -Xmx$OUR_JAVA_MEM"
 
 # Load extra JAVA_OPTS from conf/java-opts, if it exists
-if [ -e "$FWDIR/conf/java-opts" ] ; then
-  JAVA_OPTS="$JAVA_OPTS `cat "$FWDIR"/conf/java-opts`"
+if [ -e "$SPARK_CONF_DIR/java-opts" ] ; then
+  JAVA_OPTS="$JAVA_OPTS `cat "$SPARK_CONF_DIR"/java-opts`"
 fi
 
 # Attention: when changing the way the JAVA_OPTS are assembled, the change must be reflected in CommandUtils.scala!


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