diff options
author | Sean Owen <sowen@cloudera.com> | 2016-08-24 20:04:09 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-08-24 20:04:09 +0100 |
commit | 0b3a4be92ca6b38eef32ea5ca240d9f91f68aa65 (patch) | |
tree | fceae4d22e14f83548bd505535cd67e71b030b3d /yarn | |
parent | 2fbdb606392631b1dff88ec86f388cc2559c28f5 (diff) | |
download | spark-0b3a4be92ca6b38eef32ea5ca240d9f91f68aa65.tar.gz spark-0b3a4be92ca6b38eef32ea5ca240d9f91f68aa65.tar.bz2 spark-0b3a4be92ca6b38eef32ea5ca240d9f91f68aa65.zip |
[SPARK-16781][PYSPARK] java launched by PySpark as gateway may not be the same java used in the spark environment
## What changes were proposed in this pull request?
Update to py4j 0.10.3 to enable JAVA_HOME support
## How was this patch tested?
Pyspark tests
Author: Sean Owen <sowen@cloudera.com>
Closes #14748 from srowen/SPARK-16781.
Diffstat (limited to 'yarn')
-rw-r--r-- | yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala | 6 | ||||
-rw-r--r-- | yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala index 93684005f1..7fbbe91de9 100644 --- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala +++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala @@ -1172,10 +1172,10 @@ private[spark] class Client( val pyLibPath = Seq(sys.env("SPARK_HOME"), "python", "lib").mkString(File.separator) val pyArchivesFile = new File(pyLibPath, "pyspark.zip") require(pyArchivesFile.exists(), - "pyspark.zip not found; cannot run pyspark application in YARN mode.") - val py4jFile = new File(pyLibPath, "py4j-0.10.1-src.zip") + s"$pyArchivesFile not found; cannot run pyspark application in YARN mode.") + val py4jFile = new File(pyLibPath, "py4j-0.10.3-src.zip") require(py4jFile.exists(), - "py4j-0.10.1-src.zip not found; cannot run pyspark application in YARN mode.") + s"$py4jFile not found; cannot run pyspark application in YARN mode.") Seq(pyArchivesFile.getAbsolutePath(), py4jFile.getAbsolutePath()) } } diff --git a/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala b/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala index fb7926f6a1..d245acf49a 100644 --- a/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala +++ b/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala @@ -242,7 +242,7 @@ class YarnClusterSuite extends BaseYarnClusterSuite { // needed locations. val sparkHome = sys.props("spark.test.home") val pythonPath = Seq( - s"$sparkHome/python/lib/py4j-0.10.1-src.zip", + s"$sparkHome/python/lib/py4j-0.10.3-src.zip", s"$sparkHome/python") val extraEnvVars = Map( "PYSPARK_ARCHIVES_PATH" -> pythonPath.map("local:" + _).mkString(File.pathSeparator), |