aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/pyspark1
-rw-r--r--python/pyspark/java_gateway.py6
2 files changed, 2 insertions, 5 deletions
diff --git a/bin/pyspark b/bin/pyspark
index e7f6a1a072..776b28dc41 100755
--- a/bin/pyspark
+++ b/bin/pyspark
@@ -89,7 +89,6 @@ export PYTHONSTARTUP="$SPARK_HOME/python/pyspark/shell.py"
if [[ -n "$SPARK_TESTING" ]]; then
unset YARN_CONF_DIR
unset HADOOP_CONF_DIR
- export PYSPARK_SUBMIT_ARGS=pyspark-shell
if [[ -n "$PYSPARK_DOC_TEST" ]]; then
exec "$PYSPARK_DRIVER_PYTHON" -m doctest $1
else
diff --git a/python/pyspark/java_gateway.py b/python/pyspark/java_gateway.py
index 43d2cf5171..0a16cbd8bf 100644
--- a/python/pyspark/java_gateway.py
+++ b/python/pyspark/java_gateway.py
@@ -38,10 +38,8 @@ def launch_gateway():
# proper classpath and settings from spark-env.sh
on_windows = platform.system() == "Windows"
script = "./bin/spark-submit.cmd" if on_windows else "./bin/spark-submit"
- submit_args = os.environ.get("PYSPARK_SUBMIT_ARGS")
- submit_args = submit_args if submit_args is not None else ""
- submit_args = shlex.split(submit_args)
- command = [os.path.join(SPARK_HOME, script)] + submit_args
+ submit_args = os.environ.get("PYSPARK_SUBMIT_ARGS", "pyspark-shell")
+ command = [os.path.join(SPARK_HOME, script)] + shlex.split(submit_args)
# Start a socket that will be used by PythonGatewayServer to communicate its port to us
callback_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)