diff options
author | Patrick Wendell <pwendell@gmail.com> | 2014-01-15 10:58:02 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-01-15 11:05:36 -0800 |
commit | 00a3f7eec584fa52266ff0fe3e85bbe7603183a6 (patch) | |
tree | 24cafae7dd12a96c4f948ddeab8c91497b0a959a /core | |
parent | 3fcc68bfa5e9ef4b7abfd5051b6847a833e1ad2f (diff) | |
download | spark-00a3f7eec584fa52266ff0fe3e85bbe7603183a6.tar.gz spark-00a3f7eec584fa52266ff0fe3e85bbe7603183a6.tar.bz2 spark-00a3f7eec584fa52266ff0fe3e85bbe7603183a6.zip |
Workers should use working directory as spark home if it's not specified
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala b/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala index 5182dcbb2a..312560d706 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala @@ -209,8 +209,11 @@ private[spark] class Worker( logWarning("Invalid Master (" + masterUrl + ") attempted to launch executor.") } else { logInfo("Asked to launch executor %s/%d for %s".format(appId, execId, appDesc.name)) + // TODO (pwendell): We shuld make sparkHome an Option[String] in + // ApplicationDescription to be more explicit about this. + val effectiveSparkHome = Option(execSparkHome_).getOrElse(sparkHome.getAbsolutePath) val manager = new ExecutorRunner(appId, execId, appDesc, cores_, memory_, - self, workerId, host, new File(execSparkHome_), workDir, akkaUrl, ExecutorState.RUNNING) + self, workerId, host, new File(effectiveSparkHome), workDir, akkaUrl, ExecutorState.RUNNING) executors(appId + "/" + execId) = manager manager.start() coresUsed += cores_ |