Skip to content
Snippets Groups Projects
Commit f7e21dd1 authored by Marcelo Vanzin's avatar Marcelo Vanzin Committed by Josh Rosen
Browse files

[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.
parent 15e0d2bd
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment