diff options
author | Marcelo Vanzin <vanzin@cloudera.com> | 2015-04-08 10:14:52 -0700 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2015-04-08 10:14:52 -0700 |
commit | f7e21dd1ec4541be54eb01d8b15cfcc6714feed0 (patch) | |
tree | f2a0a3473052c109b04e21498bcf0bb3659c4741 /python/pyspark/java_gateway.py | |
parent | 15e0d2bd1304db62fad286c1bb687e87c361e16c (diff) | |
download | spark-f7e21dd1ec4541be54eb01d8b15cfcc6714feed0.tar.gz spark-f7e21dd1ec4541be54eb01d8b15cfcc6714feed0.tar.bz2 spark-f7e21dd1ec4541be54eb01d8b15cfcc6714feed0.zip |
[SPARK-6506] [pyspark] Do not try to retrieve SPARK_HOME when not needed...
....
In particular, this makes pyspark in yarn-cluster mode fail unless
SPARK_HOME is set, when it's not really needed.
Author: Marcelo Vanzin <vanzin@cloudera.com>
Closes #5405 from vanzin/SPARK-6506 and squashes the following commits:
e184507 [Marcelo Vanzin] [SPARK-6506] [pyspark] Do not try to retrieve SPARK_HOME when not needed.
Diffstat (limited to 'python/pyspark/java_gateway.py')
-rw-r--r-- | python/pyspark/java_gateway.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/pyspark/java_gateway.py b/python/pyspark/java_gateway.py index 0a16cbd8bf..2a5e84a7df 100644 --- a/python/pyspark/java_gateway.py +++ b/python/pyspark/java_gateway.py @@ -29,11 +29,10 @@ from pyspark.serializers import read_int def launch_gateway(): - SPARK_HOME = os.environ["SPARK_HOME"] - if "PYSPARK_GATEWAY_PORT" in os.environ: gateway_port = int(os.environ["PYSPARK_GATEWAY_PORT"]) else: + SPARK_HOME = os.environ["SPARK_HOME"] # Launch the Py4j gateway using Spark's run command so that we pick up the # proper classpath and settings from spark-env.sh on_windows = platform.system() == "Windows" |