From 2ba9b6a2dfff8eb06b6f93024f5140e784b8be49 Mon Sep 17 00:00:00 2001 From: Jon Maurer Date: Wed, 10 Feb 2016 09:54:22 +0000 Subject: [SPARK-11518][DEPLOY, WINDOWS] Handle spaces in Windows command scripts Author: Jon Maurer Author: Jonathan Maurer Closes #10789 from tritab/cmd_updates. --- bin/run-example2.cmd | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'bin/run-example2.cmd') 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% -- cgit v1.2.3