diff options
author | Patrick Wendell <pwendell@gmail.com> | 2014-04-24 23:59:16 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-04-24 23:59:16 -0700 |
commit | dc3b640a0ab3501b678b591be3e99fbcf3badbec (patch) | |
tree | 2865c2a3cef66f061d846f6a968725e83728271b /repl | |
parent | 6e101f1183f92769779bc8ac14813c063bf1ff3f (diff) | |
download | spark-dc3b640a0ab3501b678b591be3e99fbcf3badbec.tar.gz spark-dc3b640a0ab3501b678b591be3e99fbcf3badbec.tar.bz2 spark-dc3b640a0ab3501b678b591be3e99fbcf3badbec.zip |
SPARK-1619 Launch spark-shell with spark-submit
This simplifies the shell a bunch and passes all arguments through to spark-submit.
There is a tiny incompatibility from 0.9.1 which is that you can't put `-c` _or_ `--cores`, only `--cores`. However, spark-submit will give a good error message in this case, I don't think many people used this, and it's a trivial change for users.
Author: Patrick Wendell <pwendell@gmail.com>
Closes #542 from pwendell/spark-shell and squashes the following commits:
9eb3e6f [Patrick Wendell] Updating Spark docs
b552459 [Patrick Wendell] Andrew's feedback
97720fa [Patrick Wendell] Review feedback
aa2900b [Patrick Wendell] SPARK-1619 Launch spark-shell with spark-submit
Diffstat (limited to 'repl')
-rw-r--r-- | repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala b/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala index beb40e8702..296da74068 100644 --- a/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala +++ b/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala @@ -963,8 +963,9 @@ class SparkILoop(in0: Option[BufferedReader], protected val out: JPrintWriter, val master = this.master match { case Some(m) => m case None => { - val prop = System.getenv("MASTER") - if (prop != null) prop else "local[*]" + val envMaster = sys.env.get("MASTER") + val propMaster = sys.props.get("spark.master") + envMaster.orElse(propMaster).getOrElse("local[*]") } } master |