diff options
author | Jon Maurer <tritab@gmail.com> | 2016-02-10 09:54:22 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-02-10 09:54:22 +0000 |
commit | 2ba9b6a2dfff8eb06b6f93024f5140e784b8be49 (patch) | |
tree | b2c27558ff9aab71a55a488f32dcce9a3308fede /bin/spark-class2.cmd | |
parent | 9269036d8c8bb60097fd9aacfb7a89d8e873d978 (diff) | |
download | spark-2ba9b6a2dfff8eb06b6f93024f5140e784b8be49.tar.gz spark-2ba9b6a2dfff8eb06b6f93024f5140e784b8be49.tar.bz2 spark-2ba9b6a2dfff8eb06b6f93024f5140e784b8be49.zip |
[SPARK-11518][DEPLOY, WINDOWS] Handle spaces in Windows command scripts
Author: Jon Maurer <tritab@gmail.com>
Author: Jonathan Maurer <jmaurer@Jonathans-MacBook-Pro.local>
Closes #10789 from tritab/cmd_updates.
Diffstat (limited to 'bin/spark-class2.cmd')
-rw-r--r-- | bin/spark-class2.cmd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/spark-class2.cmd b/bin/spark-class2.cmd index db09fa27e5..c4fadb8223 100644 --- a/bin/spark-class2.cmd +++ b/bin/spark-class2.cmd @@ -20,7 +20,7 @@ rem rem Figure out where the Spark framework is installed set SPARK_HOME=%~dp0.. -call %SPARK_HOME%\bin\load-spark-env.cmd +call "%SPARK_HOME%\bin\load-spark-env.cmd" rem Test that an argument was given if "x%1"=="x" ( @@ -32,9 +32,9 @@ rem Find assembly jar set SPARK_ASSEMBLY_JAR=0 if exist "%SPARK_HOME%\RELEASE" ( - set ASSEMBLY_DIR=%SPARK_HOME%\lib + set ASSEMBLY_DIR="%SPARK_HOME%\lib" ) else ( - set ASSEMBLY_DIR=%SPARK_HOME%\assembly\target\scala-%SPARK_SCALA_VERSION% + set ASSEMBLY_DIR="%SPARK_HOME%\assembly\target\scala-%SPARK_SCALA_VERSION%" ) for %%d in (%ASSEMBLY_DIR%\spark-assembly*hadoop*.jar) do ( @@ -50,7 +50,7 @@ set LAUNCH_CLASSPATH=%SPARK_ASSEMBLY_JAR% rem Add the launcher build dir to the classpath if requested. if not "x%SPARK_PREPEND_CLASSES%"=="x" ( - set LAUNCH_CLASSPATH=%SPARK_HOME%\launcher\target\scala-%SPARK_SCALA_VERSION%\classes;%LAUNCH_CLASSPATH% + set LAUNCH_CLASSPATH="%SPARK_HOME%\launcher\target\scala-%SPARK_SCALA_VERSION%\classes;%LAUNCH_CLASSPATH%" ) set _SPARK_ASSEMBLY=%SPARK_ASSEMBLY_JAR% @@ -62,7 +62,7 @@ if not "x%JAVA_HOME%"=="x" set RUNNER=%JAVA_HOME%\bin\java rem The launcher library prints the command to be executed in a single line suitable for being rem executed by the batch interpreter. So read all the output of the launcher into a variable. set LAUNCHER_OUTPUT=%temp%\spark-class-launcher-output-%RANDOM%.txt -"%RUNNER%" -cp %LAUNCH_CLASSPATH% org.apache.spark.launcher.Main %* > %LAUNCHER_OUTPUT% +"%RUNNER%" -cp "%LAUNCH_CLASSPATH%" org.apache.spark.launcher.Main %* > %LAUNCHER_OUTPUT% for /f "tokens=*" %%i in (%LAUNCHER_OUTPUT%) do ( set SPARK_CMD=%%i ) |