spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewo...@apache.org
Subject spark git commit: SPARK-5382: Use SPARK_CONF_DIR in spark-class if it is defined
Date Sun, 25 Jan 2015 23:18:27 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.2 a7e99ede4 -> 7652809be


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

Author: Jacek Lewandowski <lewandowski.jacek@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/7652809b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7652809b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7652809b

Branch: refs/heads/branch-1.2
Commit: 7652809be1ae02b4d66dcdf77b448f6d08b7d902
Parents: a7e99ed
Author: Jacek Lewandowski <lewandowski.jacek@gmail.com>
Authored: Sun Jan 25 15:15:09 2015 -0800
Committer: Andrew Or <andrew@databricks.com>
Committed: Sun Jan 25 15:18:20 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/spark/blob/7652809b/bin/spark-class
----------------------------------------------------------------------
diff --git a/bin/spark-class b/bin/spark-class
index 0d58d95..3e6c367 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
 
@@ -118,8 +119,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


Mime
View raw message