aboutsummaryrefslogtreecommitdiff
path: root/pyspark
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2013-07-28 22:21:04 -0400
committerMatei Zaharia <matei@eecs.berkeley.edu>2013-07-28 22:23:13 -0400
commit72ff62a37c7310bab02f0231e91d3ba4d423217a (patch)
tree35e7f51adb1c840e9e1e38596baf9ea40b1ded89 /pyspark
parentf3d72ff2fef6d9aac7fea70df567ab8c4cbea1d5 (diff)
downloadspark-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-xpyspark10
1 files changed, 7 insertions, 3 deletions
diff --git a/pyspark b/pyspark
index 37a355462e..801239c108 100755
--- a/pyspark
+++ b/pyspark
@@ -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