File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4141fi
4242
4343# Look for the launcher. In non-release mode, add the compiled classes directly to the classpath
44- # instead of looking for a jar file, since it's very common for people using sbt to use the
45- # "assembly" target instead of "package".
44+ # instead of looking for a jar file.
4645SPARK_LAUNCHER_CP=
4746if [ -f $SPARK_HOME /RELEASE ]; then
4847 LAUNCHER_DIR=" $SPARK_HOME /lib"
7271 SPARK_LAUNCHER_CP=" $LAUNCHER_DIR /classes"
7372fi
7473
75- # The launcher library will print arguments separated by a NULL character. Read that in a while
76- # loop, populating an array that will be used to exec the final command.
74+ # The launcher library will print arguments separated by a NULL character, to allow arguments with
75+ # characters that would be otherwise interpreted by the shell. Read that in a while loop, populating
76+ # an array that will be used to exec the final command.
7777CMD=()
7878while IFS= read -d ' ' -r ARG; do
7979 CMD+=(" $ARG " )
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ rem Figure out where java is.
6262set RUNNER = java
6363if not " x%JAVA_HOME% " == " x" set RUNNER = %JAVA_HOME% \bin\java
6464
65+ rem The launcher library prints the command to be executed in a single line suitable for being
66+ rem executed by the batch interpreter. So read all the output of the launcher into a variable.
6567for /f " tokens=*" %%i in ('cmd /C " " %RUNNER% " -cp %LAUNCHER_CP% org.apache.spark.launcher.Main %* " ') do (
6668 set SPARK_CMD = %%i
6769)
Original file line number Diff line number Diff line change 2020rem This is the entry point for running Spark submit. To avoid polluting the
2121rem environment, it just launches a new cmd to do the real work.
2222
23- cmd /V /E /C %~dp0 spark-submit2 .cmd %*
23+ cmd /V /E /C %~dp0 spark-class2 .cmd org.apache.spark.deploy.SparkSubmit %*
You can’t perform that action at this time.
0 commit comments