aboutsummaryrefslogtreecommitdiff
path: root/bin/spark-class
diff options
context:
space:
mode:
authorJacek Lewandowski <lewandowski.jacek@gmail.com>2015-01-25 15:15:09 -0800
committerAndrew Or <andrew@databricks.com>2015-01-25 15:15:09 -0800
commit1c30afdf94b27e1ad65df0735575306e65d148a1 (patch)
tree2feee067cf64ec62546fc2600726d94d6ed8a1e0 /bin/spark-class
parent383425ab70aef4d4961f60309309ba5cb663db5f (diff)
downloadspark-1c30afdf94b27e1ad65df0735575306e65d148a1.tar.gz
spark-1c30afdf94b27e1ad65df0735575306e65d148a1.tar.bz2
spark-1c30afdf94b27e1ad65df0735575306e65d148a1.zip
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
Diffstat (limited to 'bin/spark-class')
-rwxr-xr-xbin/spark-class5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/spark-class b/bin/spark-class
index 1b945461fa..2f0441bb3c 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!