File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,8 @@ if [ -n "$SPARK_SUBMIT_BOOTSTRAP_DRIVER" ]; then
167167 export CLASSPATH
168168 export JAVA_OPTS
169169 export OUR_JAVA_MEM
170- shift
170+ export SPARK_CLASS=1
171+ shift # Ignore main class and use our own
171172 exec " $RUNNER " org.apache.spark.deploy.SparkSubmitDriverBootstrapper " $@ "
172173else
173174 # Note: The format of this command is closely echoed in SparkSubmitDriverBootstrapper.scala
Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ private[spark] object SparkSubmitDriverBootstrapper {
3737 // Any changes made there must be reflected in this file.
3838
3939 def main (args : Array [String ]): Unit = {
40+
41+ // This should be called only from `bin/spark-class`
42+ if (! sys.env.contains(" SPARK_CLASS" )) {
43+ System .err.println(" SparkSubmitDriverBootstrapper must be called from `bin/spark-class`!" )
44+ System .exit(1 )
45+ }
46+
4047 val submitArgs = args
4148 val runner = sys.env(" RUNNER" )
4249 val classpath = sys.env(" CLASSPATH" )
You can’t perform that action at this time.
0 commit comments