diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-07-28 22:21:04 -0400 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-07-28 22:23:13 -0400 |
commit | 72ff62a37c7310bab02f0231e91d3ba4d423217a (patch) | |
tree | 35e7f51adb1c840e9e1e38596baf9ea40b1ded89 /pyspark | |
parent | f3d72ff2fef6d9aac7fea70df567ab8c4cbea1d5 (diff) | |
download | spark-72ff62a37c7310bab02f0231e91d3ba4d423217a.tar.gz spark-72ff62a37c7310bab02f0231e91d3ba4d423217a.tar.bz2 spark-72ff62a37c7310bab02f0231e91d3ba4d423217a.zip |
Two fixes to IPython support:
- Don't attempt to run worker processes with ipython (that can cause
some crashes as ipython prints things to standard out)
- Allow passing some IPYTHON_OPTS to launch things like the notebook
Diffstat (limited to 'pyspark')
-rwxr-xr-x | pyspark | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -53,9 +53,13 @@ if [[ "$SPARK_LAUNCH_WITH_SCALA" != "0" ]] ; then export SPARK_LAUNCH_WITH_SCALA=1 fi +if [ -n "$IPYTHON_OPTS" ]; then + IPYTHON=1 +fi + if [[ "$IPYTHON" = "1" ]] ; then - export PYSPARK_PYTHON="ipython" - exec "$PYSPARK_PYTHON" -i -c "%run $PYTHONSTARTUP" + IPYTHON_OPTS=${IPYTHON_OPTS:--i} + exec ipython "$IPYTHON_OPTS" -c "%run $PYTHONSTARTUP" else - exec "$PYSPARK_PYTHON" "$@" + exec "$PYSPARK_PYTHON" "$@" fi |