aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGuoQiang Li <witgo@qq.com>2014-10-29 23:02:58 -0700
committerAndrew Or <andrew@databricks.com>2014-10-29 23:02:58 -0700
commitcd739bd756875bd52e9bd8ae801e0ae10a1f6937 (patch)
treee64c462e3491eab7b127894f0c97197ba493b427 /bin
parent1234258077b1f4050845e9fb73066b37f981c72a (diff)
downloadspark-cd739bd756875bd52e9bd8ae801e0ae10a1f6937.tar.gz
spark-cd739bd756875bd52e9bd8ae801e0ae10a1f6937.tar.bz2
spark-cd739bd756875bd52e9bd8ae801e0ae10a1f6937.zip
[SPARK-1720][SPARK-1719] use LD_LIBRARY_PATH instead of -Djava.library.path
- [X] Standalone - [X] YARN - [X] Mesos - [X] Mac OS X - [X] Linux - [ ] Windows This is another implementation about #1031 Author: GuoQiang Li <witgo@qq.com> Closes #2711 from witgo/SPARK-1719 and squashes the following commits: c7b26f6 [GuoQiang Li] review commits 4488e41 [GuoQiang Li] Refactoring CommandUtils a444094 [GuoQiang Li] review commits 40c0b4a [GuoQiang Li] Add buildLocalCommand method c1a0ddd [GuoQiang Li] fix comments 156ce88 [GuoQiang Li] review commit 38aa377 [GuoQiang Li] Refactor CommandUtils.scala 4269e00 [GuoQiang Li] Refactor SparkSubmitDriverBootstrapper.scala 7a1d634 [GuoQiang Li] use LD_LIBRARY_PATH instead of -Djava.library.path
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spark-class6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/spark-class b/bin/spark-class
index 91d858bc06..925367b0dd 100755
--- a/bin/spark-class
+++ b/bin/spark-class
@@ -81,7 +81,11 @@ case "$1" in
OUR_JAVA_OPTS="$SPARK_JAVA_OPTS $SPARK_SUBMIT_OPTS"
OUR_JAVA_MEM=${SPARK_DRIVER_MEMORY:-$DEFAULT_MEM}
if [ -n "$SPARK_SUBMIT_LIBRARY_PATH" ]; then
- OUR_JAVA_OPTS="$OUR_JAVA_OPTS -Djava.library.path=$SPARK_SUBMIT_LIBRARY_PATH"
+ if [[ $OSTYPE == darwin* ]]; then
+ export DYLD_LIBRARY_PATH="$SPARK_SUBMIT_LIBRARY_PATH:$DYLD_LIBRARY_PATH"
+ else
+ export LD_LIBRARY_PATH="$SPARK_SUBMIT_LIBRARY_PATH:$LD_LIBRARY_PATH"
+ fi
fi
if [ -n "$SPARK_SUBMIT_DRIVER_MEMORY" ]; then
OUR_JAVA_MEM="$SPARK_SUBMIT_DRIVER_MEMORY"