From 6b86aa0b524b4d19b91ab434d2088667c9a1e662 Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Mon, 4 Jan 2021 10:23:38 -0800 Subject: [PATCH] [SPARK-33984][PYTHON] Upgrade to Py4J 0.10.9.1 ### What changes were proposed in this pull request? This PR upgrade Py4J from 0.10.9 to 0.10.9.1 that contains some bug fixes and improvements. It contains one bug fix (https://github.com/bartdag/py4j/commit/4152353ac142a7c6d177e0d8f5d420d92c846a30). ### Why are the changes needed? To leverage fixes from the upstream in Py4J. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Jenkins build and GitHub Actions will test it out. Closes #31009 from HyukjinKwon/SPARK-33984. Authored-by: HyukjinKwon Signed-off-by: Dongjoon Hyun --- bin/pyspark | 2 +- bin/pyspark2.cmd | 2 +- core/pom.xml | 2 +- .../apache/spark/api/python/PythonUtils.scala | 2 +- dev/deps/spark-deps-hadoop-2.7-hive-2.3 | 2 +- dev/deps/spark-deps-hadoop-3.2-hive-2.3 | 2 +- python/docs/Makefile | 2 +- python/docs/make2.bat | 2 +- ...j-0.10.9-src.zip => py4j-0.10.9.1-src.zip} | Bin 41587 -> 41589 bytes python/setup.py | 2 +- sbin/spark-config.sh | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename python/lib/{py4j-0.10.9-src.zip => py4j-0.10.9.1-src.zip} (94%) diff --git a/bin/pyspark b/bin/pyspark index 463a2dcfc7e6c..251bfef5c80a8 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -50,7 +50,7 @@ export PYSPARK_DRIVER_PYTHON_OPTS # Add the PySpark classes to the Python path: export PYTHONPATH="${SPARK_HOME}/python/:$PYTHONPATH" -export PYTHONPATH="${SPARK_HOME}/python/lib/py4j-0.10.9-src.zip:$PYTHONPATH" +export PYTHONPATH="${SPARK_HOME}/python/lib/py4j-0.10.9.1-src.zip:$PYTHONPATH" # Load the PySpark shell.py script when ./pyspark is used interactively: export OLD_PYTHONSTARTUP="$PYTHONSTARTUP" diff --git a/bin/pyspark2.cmd b/bin/pyspark2.cmd index dc34be1a41706..5741480fe5501 100644 --- a/bin/pyspark2.cmd +++ b/bin/pyspark2.cmd @@ -30,7 +30,7 @@ if "x%PYSPARK_DRIVER_PYTHON%"=="x" ( ) set PYTHONPATH=%SPARK_HOME%\python;%PYTHONPATH% -set PYTHONPATH=%SPARK_HOME%\python\lib\py4j-0.10.9-src.zip;%PYTHONPATH% +set PYTHONPATH=%SPARK_HOME%\python\lib\py4j-0.10.9.1-src.zip;%PYTHONPATH% set OLD_PYTHONSTARTUP=%PYTHONSTARTUP% set PYTHONSTARTUP=%SPARK_HOME%\python\pyspark\shell.py diff --git a/core/pom.xml b/core/pom.xml index 1f24c5273ad0b..09fa153c8f20b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -414,7 +414,7 @@ net.sf.py4j py4j - 0.10.9 + 0.10.9.1 org.apache.spark diff --git a/core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala b/core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala index 2f47d28f09103..717eb4db6dd93 100644 --- a/core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala +++ b/core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala @@ -27,7 +27,7 @@ import org.apache.spark.SparkContext import org.apache.spark.api.java.{JavaRDD, JavaSparkContext} private[spark] object PythonUtils { - val PY4J_ZIP_NAME = "py4j-0.10.9-src.zip" + val PY4J_ZIP_NAME = "py4j-0.10.9.1-src.zip" /** Get the PYTHONPATH for PySpark, either from SPARK_HOME, if it is set, or from our JAR */ def sparkPythonPath: String = { diff --git a/dev/deps/spark-deps-hadoop-2.7-hive-2.3 b/dev/deps/spark-deps-hadoop-2.7-hive-2.3 index fc3b669e721ac..9c516203dd3fa 100644 --- a/dev/deps/spark-deps-hadoop-2.7-hive-2.3 +++ b/dev/deps/spark-deps-hadoop-2.7-hive-2.3 @@ -209,7 +209,7 @@ parquet-format/2.4.0//parquet-format-2.4.0.jar parquet-hadoop/1.10.1//parquet-hadoop-1.10.1.jar parquet-jackson/1.10.1//parquet-jackson-1.10.1.jar protobuf-java/2.5.0//protobuf-java-2.5.0.jar -py4j/0.10.9//py4j-0.10.9.jar +py4j/0.10.9.1//py4j-0.10.9.1.jar pyrolite/4.30//pyrolite-4.30.jar scala-collection-compat_2.12/2.1.1//scala-collection-compat_2.12-2.1.1.jar scala-compiler/2.12.10//scala-compiler-2.12.10.jar diff --git a/dev/deps/spark-deps-hadoop-3.2-hive-2.3 b/dev/deps/spark-deps-hadoop-3.2-hive-2.3 index 0ff30ce0c0a2d..1d80fadb5762a 100644 --- a/dev/deps/spark-deps-hadoop-3.2-hive-2.3 +++ b/dev/deps/spark-deps-hadoop-3.2-hive-2.3 @@ -224,7 +224,7 @@ parquet-format/2.4.0//parquet-format-2.4.0.jar parquet-hadoop/1.10.1//parquet-hadoop-1.10.1.jar parquet-jackson/1.10.1//parquet-jackson-1.10.1.jar protobuf-java/2.5.0//protobuf-java-2.5.0.jar -py4j/0.10.9//py4j-0.10.9.jar +py4j/0.10.9.1//py4j-0.10.9.1.jar pyrolite/4.30//pyrolite-4.30.jar re2j/1.1//re2j-1.1.jar scala-collection-compat_2.12/2.1.1//scala-collection-compat_2.12-2.1.1.jar diff --git a/python/docs/Makefile b/python/docs/Makefile index 763f493a0eb58..090ad7d62bed1 100644 --- a/python/docs/Makefile +++ b/python/docs/Makefile @@ -6,7 +6,7 @@ SPHINXBUILD ?= sphinx-build SOURCEDIR ?= source BUILDDIR ?= build -export PYTHONPATH=$(realpath ..):$(realpath ../lib/py4j-0.10.9-src.zip) +export PYTHONPATH=$(realpath ..):$(realpath ../lib/py4j-0.10.9.1-src.zip) # Put it first so that "make" without argument is like "make help". help: diff --git a/python/docs/make2.bat b/python/docs/make2.bat index 2f87032820f42..485b5eda19735 100644 --- a/python/docs/make2.bat +++ b/python/docs/make2.bat @@ -8,7 +8,7 @@ if "%SPHINXBUILD%" == "" ( set SOURCEDIR=source set BUILDDIR=build -set PYTHONPATH=..;..\lib\py4j-0.10.9-src.zip +set PYTHONPATH=..;..\lib\py4j-0.10.9.1-src.zip if "%1" == "" goto help diff --git a/python/lib/py4j-0.10.9-src.zip b/python/lib/py4j-0.10.9.1-src.zip similarity index 94% rename from python/lib/py4j-0.10.9-src.zip rename to python/lib/py4j-0.10.9.1-src.zip index 2c498361470305cd2f2cdecec81c2aa21a4a6f3d..11eb331b6f2c67326dfbc2e600fb97b30ae6f47b 100644 GIT binary patch delta 879 zcmex-gz4)MCcXe~W)=|!1_lm>4GbEAlMl{Q<+t_;i$DA5Q+#O!Hv=Qfx5;1Uh4UaQ zn#iXKR&x%aW}{oF1Pj=J{SwOP25kN)@skN6`%YR7LsnVlDKkWtM?n`u)7=7EeeOo^0#3)e6w?#oDf7db%qLt$unjgW#t9AS^A%(q9iZ~BqwLhldebe zJtG4HIDF#c%TkMqGxPJ};}vWb)D83u4fHJa4Ar>;ycwC~m=Qs!lE8e!7id~O5DPF! z07(W0pdk!f8bPdrN|P-8`1s7c%#!$cy@JZn5LO0ekd@HDW}N(SzOW+5Rlhshdy|3M zZ8I4dL{Q9`&cHBHR-6x2o-+Y`!^yzFhoa9za`J`wqTEQffiyXT zGzI@!+;W+jf#H$>1A`!nrg9mmqti0;5_2-EQj4&-8e|S6pyL-vuxx3ZsxY~FfjqiR z5EXkDNU&~c+@;4b*+CDRC!D~ZU|V*ZM~H#pswH|L&S-fr&7Jl?|kw69|QY KVd^sD#b#-iAy#4E42G!JjMLtN-MY-7+Jn40+O2? zCaH`rxw%8~Clf@rRYna%c9+akW)?qb%Yey?6?FNZsOrQa8NB(v!c$&|>`cL>Pb!AYcUIC5;S|&(4=o28AFr z^nk+P;0^FbHDWT)0tuTXjT?cQ3o1>r^po>*3ldB83MxZGSQ(g!F(6@q1j~}f2hx*k z7D&_+&;W`8#wSy+U*=_CD0F84IvLr~|Ky>L$Vx0rj8D$b$w^Hv$;{6yhB*fmad`aW zCoO9kaG`-^=Y((u2DM5?v@lVgY_L#9nSdGK1eU*0B63M1V;j^t1x5KK`9SBuoI!*q z&;6R!wwaZIfm4uyfgi<_;gcUM6tBnW3NCOYqNEw12&xgm^PmnZOD!q}h7ZhLpmc>N zctBoLNnpO=%fK)>dA^{_lE%$2gW}^e^D;}~<6$OY^&u-8$ZecJD9p^j;58q_0{{S$ B<;DO2 diff --git a/python/setup.py b/python/setup.py index f5836ecf5fbfc..7bb8a00171d37 100755 --- a/python/setup.py +++ b/python/setup.py @@ -250,7 +250,7 @@ def run(self): license='http://www.apache.org/licenses/LICENSE-2.0', # Don't forget to update python/docs/source/getting_started/install.rst # if you're updating the versions or dependencies. - install_requires=['py4j==0.10.9'], + install_requires=['py4j==0.10.9.1'], extras_require={ 'ml': ['numpy>=1.7'], 'mllib': ['numpy>=1.7'], diff --git a/sbin/spark-config.sh b/sbin/spark-config.sh index b53442ec096a1..7389416bb3192 100755 --- a/sbin/spark-config.sh +++ b/sbin/spark-config.sh @@ -28,6 +28,6 @@ export SPARK_CONF_DIR="${SPARK_CONF_DIR:-"${SPARK_HOME}/conf"}" # Add the PySpark classes to the PYTHONPATH: if [ -z "${PYSPARK_PYTHONPATH_SET}" ]; then export PYTHONPATH="${SPARK_HOME}/python:${PYTHONPATH}" - export PYTHONPATH="${SPARK_HOME}/python/lib/py4j-0.10.9-src.zip:${PYTHONPATH}" + export PYTHONPATH="${SPARK_HOME}/python/lib/py4j-0.10.9.1-src.zip:${PYTHONPATH}" export PYSPARK_PYTHONPATH_SET=1 fi