- 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
This commit is contained in:
Matei Zaharia 2013-07-28 22:21:04 -04:00
Родитель f3d72ff2fe
Коммит 72ff62a37c
1 изменённых файлов: 9 добавлений и 5 удалений

14
pyspark
Просмотреть файл

@ -53,9 +53,13 @@ if [[ "$SPARK_LAUNCH_WITH_SCALA" != "0" ]] ; then
export SPARK_LAUNCH_WITH_SCALA=1
fi
if [[ "$IPYTHON" = "1" ]] ; then
export PYSPARK_PYTHON="ipython"
exec "$PYSPARK_PYTHON" -i -c "%run $PYTHONSTARTUP"
else
exec "$PYSPARK_PYTHON" "$@"
if [ -n "$IPYTHON_OPTS" ]; then
IPYTHON=1
fi
if [[ "$IPYTHON" = "1" ]] ; then
IPYTHON_OPTS=${IPYTHON_OPTS:--i}
exec ipython "$IPYTHON_OPTS" -c "%run $PYTHONSTARTUP"
else
exec "$PYSPARK_PYTHON" "$@"
fi