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/run-example2.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/run-example2.cmd')
-rw-r--r-- | bin/run-example2.cmd | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/bin/run-example2.cmd b/bin/run-example2.cmd index c3e0221fb6..fada43581d 100644 --- a/bin/run-example2.cmd +++ b/bin/run-example2.cmd @@ -20,12 +20,9 @@ rem set SCALA_VERSION=2.10 rem Figure out where the Spark framework is installed -set FWDIR=%~dp0..\ +set SPARK_HOME=%~dp0.. -rem Export this as SPARK_HOME -set SPARK_HOME=%FWDIR% - -call %SPARK_HOME%\bin\load-spark-env.cmd +call "%SPARK_HOME%\bin\load-spark-env.cmd" rem Test that an argument was given if not "x%1"=="x" goto arg_given @@ -36,12 +33,12 @@ if not "x%1"=="x" goto arg_given goto exit :arg_given -set EXAMPLES_DIR=%FWDIR%examples +set EXAMPLES_DIR=%SPARK_HOME%\examples rem Figure out the JAR file that our examples were packaged into. set SPARK_EXAMPLES_JAR= -if exist "%FWDIR%RELEASE" ( - for %%d in ("%FWDIR%lib\spark-examples*.jar") do ( +if exist "%SPARK_HOME%\RELEASE" ( + for %%d in ("%SPARK_HOME%\lib\spark-examples*.jar") do ( set SPARK_EXAMPLES_JAR=%%d ) ) else ( @@ -80,7 +77,7 @@ if "%~1" neq "" ( ) if defined ARGS set ARGS=%ARGS:~1% -call "%FWDIR%bin\spark-submit.cmd" ^ +call "%SPARK_HOME%\bin\spark-submit.cmd" ^ --master %EXAMPLE_MASTER% ^ --class %EXAMPLE_CLASS% ^ "%SPARK_EXAMPLES_JAR%" %ARGS% |