diff options
author | Davies Liu <davies@databricks.com> | 2014-11-14 20:13:46 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2014-11-14 20:14:40 -0800 |
commit | 306e68cf00e6ec6b10f1a29eb7434f3f3ea27752 (patch) | |
tree | 7ec2004936d5554565629bbb57748d0bc09ce239 /bin | |
parent | 118c89c28d1c3c048a5bd0335db4a0c65d71a4aa (diff) | |
download | spark-306e68cf00e6ec6b10f1a29eb7434f3f3ea27752.tar.gz spark-306e68cf00e6ec6b10f1a29eb7434f3f3ea27752.tar.bz2 spark-306e68cf00e6ec6b10f1a29eb7434f3f3ea27752.zip |
[SPARK-4415] [PySpark] JVM should exit after Python exit
When JVM is started in a Python process, it should exit once the stdin is closed.
test: add spark.driver.memory in conf/spark-defaults.conf
```
daviesdm:~/work/spark$ cat conf/spark-defaults.conf
spark.driver.memory 8g
daviesdm:~/work/spark$ bin/pyspark
>>> quit
daviesdm:~/work/spark$ jps
4931 Jps
286
daviesdm:~/work/spark$ python wc.py
943738
0.719928026199
daviesdm:~/work/spark$ jps
286
4990 Jps
```
Author: Davies Liu <davies@databricks.com>
Closes #3274 from davies/exit and squashes the following commits:
df0e524 [Davies Liu] address comments
ce8599c [Davies Liu] address comments
050651f [Davies Liu] JVM should exit after Python exit
(cherry picked from commit 7fe08b43c78bf9e8515f671e72aa03a83ea782f8)
Signed-off-by: Andrew Or <andrew@databricks.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pyspark | 2 | ||||
-rw-r--r-- | bin/pyspark2.cmd | 1 |
2 files changed, 0 insertions, 3 deletions
diff --git a/bin/pyspark b/bin/pyspark index 1d8c94d43d..0b4f695dd0 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -132,7 +132,5 @@ if [[ "$1" =~ \.py$ ]]; then gatherSparkSubmitOpts "$@" exec "$FWDIR"/bin/spark-submit "${SUBMISSION_OPTS[@]}" "$primary" "${APPLICATION_OPTS[@]}" else - # PySpark shell requires special handling downstream - export PYSPARK_SHELL=1 exec "$PYSPARK_DRIVER_PYTHON" $PYSPARK_DRIVER_PYTHON_OPTS fi diff --git a/bin/pyspark2.cmd b/bin/pyspark2.cmd index 59415e9bde..a542ec80b4 100644 --- a/bin/pyspark2.cmd +++ b/bin/pyspark2.cmd @@ -59,7 +59,6 @@ for /f %%i in ('echo %1^| findstr /R "\.py"') do ( ) if [%PYTHON_FILE%] == [] ( - set PYSPARK_SHELL=1 if [%IPYTHON%] == [1] ( ipython %IPYTHON_OPTS% ) else ( |