diff options
author | shane-huang <shengsheng.huang@intel.com> | 2013-08-07 14:35:46 +0800 |
---|---|---|
committer | shane-huang <shengsheng.huang@intel.com> | 2013-08-07 14:36:48 +0800 |
commit | cbc5107e3675a2f4e22c1581739c79b1fc76ee46 (patch) | |
tree | a3663c9e413c9c4784828e0818062c1c6bd99176 /core | |
parent | 7c4b7a53b1b588c1d0d3e00e99d4d7c53dc1da3d (diff) | |
download | spark-cbc5107e3675a2f4e22c1581739c79b1fc76ee46.tar.gz spark-cbc5107e3675a2f4e22c1581739c79b1fc76ee46.tar.bz2 spark-cbc5107e3675a2f4e22c1581739c79b1fc76ee46.zip |
For standalone mode, add worker local env setting of SPARK_JAVA_OPTS as default and let application env override default options if applicable
Signed-off-by: shane-huang <shengsheng.huang@intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/deploy/worker/ExecutorRunner.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/deploy/worker/ExecutorRunner.scala b/core/src/main/scala/spark/deploy/worker/ExecutorRunner.scala index 345dfe879c..8f6d25c33f 100644 --- a/core/src/main/scala/spark/deploy/worker/ExecutorRunner.scala +++ b/core/src/main/scala/spark/deploy/worker/ExecutorRunner.scala @@ -111,6 +111,7 @@ private[spark] class ExecutorRunner( val libraryOpts = getAppEnv("SPARK_LIBRARY_PATH") .map(p => List("-Djava.library.path=" + p)) .getOrElse(Nil) + val workerLocalOpts = Option(getenv("SPARK_JAVA_OPTS")).map(Utils.splitCommandString).getOrElse(Nil) val userOpts = getAppEnv("SPARK_JAVA_OPTS").map(Utils.splitCommandString).getOrElse(Nil) val memoryOpts = Seq("-Xms" + memory + "M", "-Xmx" + memory + "M") @@ -120,7 +121,7 @@ private[spark] class ExecutorRunner( Seq(sparkHome + "/bin/compute-classpath" + ext), extraEnvironment=appDesc.command.environment) - Seq("-cp", classPath) ++ libraryOpts ++ userOpts ++ memoryOpts + Seq("-cp", classPath) ++ libraryOpts ++ workerLocalOpts ++ userOpts ++ memoryOpts } /** Spawn a thread that will redirect a given stream to a file */ |