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 /docs/scala-programming-guide.md | |
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 'docs/scala-programming-guide.md')
-rw-r--r-- | docs/scala-programming-guide.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/scala-programming-guide.md b/docs/scala-programming-guide.md index a3171709ff..b8d89cf00f 100644 --- a/docs/scala-programming-guide.md +++ b/docs/scala-programming-guide.md @@ -60,17 +60,18 @@ which avoids hard-coding the master name in your application. In the Spark shell, a special interpreter-aware SparkContext is already created for you, in the variable called `sc`. Making your own SparkContext will not work. You can set which master the -context connects to using the `MASTER` environment variable, and you can add JARs to the classpath -with the `ADD_JARS` variable. For example, to run `bin/spark-shell` on exactly four cores, use +context connects to using the `--master` argument, and you can add JARs to the classpath +by passing a comma separated list to the `--jars` argument. For example, to run +`bin/spark-shell` on exactly four cores, use {% highlight bash %} -$ MASTER=local[4] ./bin/spark-shell +$ ./bin/spark-shell --master local[4] {% endhighlight %} Or, to also add `code.jar` to its classpath, use: {% highlight bash %} -$ MASTER=local[4] ADD_JARS=code.jar ./bin/spark-shell +$ ./bin/spark-shell --master local[4] --jars code.jar {% endhighlight %} ### Master URLs |