diff options
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% |