Skip to content

Commit

Permalink
Warn against external usages of SparkSubmitDriverBootstrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Aug 20, 2014
1 parent ff34728 commit 08fd788
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/spark-class
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ if [ -n "$SPARK_SUBMIT_BOOTSTRAP_DRIVER" ]; then
export CLASSPATH
export JAVA_OPTS
export OUR_JAVA_MEM
shift
export SPARK_CLASS=1
shift # Ignore main class and use our own
exec "$RUNNER" org.apache.spark.deploy.SparkSubmitDriverBootstrapper "$@"
else
# Note: The format of this command is closely echoed in SparkSubmitDriverBootstrapper.scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ private[spark] object SparkSubmitDriverBootstrapper {
// Any changes made there must be reflected in this file.

def main(args: Array[String]): Unit = {

// This should be called only from `bin/spark-class`
if (!sys.env.contains("SPARK_CLASS")) {
System.err.println("SparkSubmitDriverBootstrapper must be called from `bin/spark-class`!")
System.exit(1)
}

val submitArgs = args
val runner = sys.env("RUNNER")
val classpath = sys.env("CLASSPATH")
Expand Down

0 comments on commit 08fd788

Please sign in to comment.