From 0309cf911cc0379b7de871463c25a7c105202f4b Mon Sep 17 00:00:00 2001 From: Diana Carroll Date: Thu, 27 Feb 2014 17:39:43 -0500 Subject: [PATCH 1/2] SPARK-1134 bug with ipython prevents non-interactive use with spark; only call ipython if no command line arguments were supplied --- bin/pyspark | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/pyspark b/bin/pyspark index ed6f8da73035a..5a12516d70740 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -58,7 +58,8 @@ if [ -n "$IPYTHON_OPTS" ]; then IPYTHON=1 fi -if [[ "$IPYTHON" = "1" ]] ; then +# Only use ipython if no command line arguments were provided [SPARK-1134] +if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then exec ipython $IPYTHON_OPTS else exec "$PYSPARK_PYTHON" "$@" From ffe47f29d0e3a709a394def6c0d1dcf67fe3fe84 Mon Sep 17 00:00:00 2001 From: Diana Carroll Date: Tue, 25 Mar 2014 12:48:30 -0400 Subject: [PATCH 2/2] [spark-1134] remove ipythonopts from ipython command --- bin/pyspark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pyspark b/bin/pyspark index 5a12516d70740..450881ff6ade6 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -60,7 +60,7 @@ fi # Only use ipython if no command line arguments were provided [SPARK-1134] if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then - exec ipython $IPYTHON_OPTS + exec ipython else exec "$PYSPARK_PYTHON" "$@" fi