diff options
author | Patrick Wendell <pwendell@gmail.com> | 2013-12-25 01:00:53 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2013-12-25 01:19:25 -0800 |
commit | 55f833803a8e5755eb01b99b976752e5c6bf14e2 (patch) | |
tree | 82ead4bae24b0dfa4e21e1e6927505028d1cf475 /core/src/main/scala/org/apache | |
parent | c9c0f745afcf00c17fa073e4ca6dd9433400be95 (diff) | |
download | spark-55f833803a8e5755eb01b99b976752e5c6bf14e2.tar.gz spark-55f833803a8e5755eb01b99b976752e5c6bf14e2.tar.bz2 spark-55f833803a8e5755eb01b99b976752e5c6bf14e2.zip |
Minor bug fix
Diffstat (limited to 'core/src/main/scala/org/apache')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/client/DriverClientArguments.scala | 5 | ||||
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/client/DriverClientArguments.scala b/core/src/main/scala/org/apache/spark/deploy/client/DriverClientArguments.scala index 618467ce8c..60e6549188 100644 --- a/core/src/main/scala/org/apache/spark/deploy/client/DriverClientArguments.scala +++ b/core/src/main/scala/org/apache/spark/deploy/client/DriverClientArguments.scala @@ -58,7 +58,12 @@ private[spark] class DriverClientArguments(args: Array[String]) { case ("--environment-variable" | "-e") :: value :: tail => val parts = value.split("=") + if (parts.length != 2) { + println(s"Error - invalid environment variable (expecting K=V): $value") + printUsageAndExit(1) + } _driverEnvVars += ((parts(0), parts(1))) + parse(tail) case ("--help" | "-h") :: tail => printUsageAndExit(0) diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala b/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala index 28d4297299..b9b6341b75 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala @@ -53,7 +53,7 @@ private[spark] class DriverRunner( try { val driverDir = createWorkingDirectory() val localJarFilename = downloadUserJar(driverDir) - val command = Seq("java") ++ driverDesc.javaOptions ++ Seq(s"-Xmx${driverDesc.mem}m") + val command = Seq("java") ++ driverDesc.javaOptions ++ Seq(s"-Xmx${driverDesc.mem}m") ++ Seq("-cp", localJarFilename) ++ Seq(driverDesc.mainClass) ++ driverDesc.options runCommandWithRetry(command, driverDesc.envVars, driverDir) } |