diff options
author | EugenCepoi <cepoi.eugen@gmail.com> | 2014-10-03 10:03:15 -0700 |
---|---|---|
committer | Andrew Or <andrewor14@gmail.com> | 2014-10-03 10:03:15 -0700 |
commit | f0811f928e5b608e1a2cba3b6828ba0ed03b701d (patch) | |
tree | 97a17a42d3825dcadf332a4d510d24deb973d00c /bin/compute-classpath.sh | |
parent | 2e4eae3a52e3d04895b00447d1ac56ae3c1b98ae (diff) | |
download | spark-f0811f928e5b608e1a2cba3b6828ba0ed03b701d.tar.gz spark-f0811f928e5b608e1a2cba3b6828ba0ed03b701d.tar.bz2 spark-f0811f928e5b608e1a2cba3b6828ba0ed03b701d.zip |
SPARK-2058: Overriding SPARK_HOME/conf with SPARK_CONF_DIR
Update of PR #997.
With this PR, setting SPARK_CONF_DIR overrides SPARK_HOME/conf (not only spark-defaults.conf and spark-env).
Author: EugenCepoi <cepoi.eugen@gmail.com>
Closes #2481 from EugenCepoi/SPARK-2058 and squashes the following commits:
0bb32c2 [EugenCepoi] use orElse orNull and fixing trailing percent in compute-classpath.cmd
77f35d7 [EugenCepoi] SPARK-2058: Overriding SPARK_HOME/conf with SPARK_CONF_DIR
Diffstat (limited to 'bin/compute-classpath.sh')
-rwxr-xr-x | bin/compute-classpath.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/compute-classpath.sh b/bin/compute-classpath.sh index 0f63e36d8a..905bbaf99b 100755 --- a/bin/compute-classpath.sh +++ b/bin/compute-classpath.sh @@ -27,8 +27,14 @@ FWDIR="$(cd "`dirname "$0"`"/..; pwd)" . "$FWDIR"/bin/load-spark-env.sh +CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH" + # Build up classpath -CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH:$FWDIR/conf" +if [ -n "$SPARK_CONF_DIR" ]; then + CLASSPATH="$CLASSPATH:$SPARK_CONF_DIR" +else + CLASSPATH="$CLASSPATH:$FWDIR/conf" +fi ASSEMBLY_DIR="$FWDIR/assembly/target/scala-$SCALA_VERSION" |