You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/06 19:33:14 UTC

[GitHub] [spark] warrenzhu25 opened a new pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

warrenzhu25 opened a new pull request #30281:
URL: https://github.com/apache/spark/pull/30281


   ### What changes were proposed in this pull request?
   Remove pyspark and py4j-0.10.9-src.zip under spark home from python path
   
   ### Why are the changes needed?
   1. Staging folder already contains uploaded pyspark and py4j-0.10.9-src.zip.
   2. If local machine has different version of both files, confliction would happen.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   UT
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #30281:
URL: https://github.com/apache/spark/pull/30281#discussion_r519511433



##########
File path: core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala
##########
@@ -29,14 +29,9 @@ import org.apache.spark.api.java.{JavaRDD, JavaSparkContext}
 private[spark] object PythonUtils {
   val PY4J_ZIP_NAME = "py4j-0.10.9-src.zip"
 
-  /** Get the PYTHONPATH for PySpark, either from SPARK_HOME, if it is set, or from our JAR */
+  /** Get the PYTHONPATH for PySpark from our JAR */
   def sparkPythonPath: String = {
     val pythonPath = new ArrayBuffer[String]
-    for (sparkHome <- sys.env.get("SPARK_HOME")) {
-      pythonPath += Seq(sparkHome, "python", "lib", "pyspark.zip").mkString(File.separator)
-      pythonPath +=
-        Seq(sparkHome, "python", "lib", PY4J_ZIP_NAME).mkString(File.separator)
-    }

Review comment:
       I would just leave this code for simplicity.
   
   > If local machine has different version of both files
   
   How would this happen? pyspark.zip and py4j.zip are built-in in Spark.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] warrenzhu25 closed pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
warrenzhu25 closed pull request #30281:
URL: https://github.com/apache/spark/pull/30281


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30281:
URL: https://github.com/apache/spark/pull/30281#issuecomment-723262772


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30281:
URL: https://github.com/apache/spark/pull/30281#issuecomment-723263372


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] warrenzhu25 commented on a change in pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
warrenzhu25 commented on a change in pull request #30281:
URL: https://github.com/apache/spark/pull/30281#discussion_r519458361



##########
File path: core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala
##########
@@ -29,14 +29,9 @@ import org.apache.spark.api.java.{JavaRDD, JavaSparkContext}
 private[spark] object PythonUtils {
   val PY4J_ZIP_NAME = "py4j-0.10.9-src.zip"
 
-  /** Get the PYTHONPATH for PySpark, either from SPARK_HOME, if it is set, or from our JAR */
+  /** Get the PYTHONPATH for PySpark from our JAR */
   def sparkPythonPath: String = {
     val pythonPath = new ArrayBuffer[String]
-    for (sparkHome <- sys.env.get("SPARK_HOME")) {
-      pythonPath += Seq(sparkHome, "python", "lib", "pyspark.zip").mkString(File.separator)
-      pythonPath +=
-        Seq(sparkHome, "python", "lib", PY4J_ZIP_NAME).mkString(File.separator)
-    }

Review comment:
       Yes, this is for yarn mode. Could we determine whether this is yarn mode, then skip this pythonPath? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30281:
URL: https://github.com/apache/spark/pull/30281#issuecomment-723262772


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #30281:
URL: https://github.com/apache/spark/pull/30281#discussion_r519365756



##########
File path: core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala
##########
@@ -29,14 +29,9 @@ import org.apache.spark.api.java.{JavaRDD, JavaSparkContext}
 private[spark] object PythonUtils {
   val PY4J_ZIP_NAME = "py4j-0.10.9-src.zip"
 
-  /** Get the PYTHONPATH for PySpark, either from SPARK_HOME, if it is set, or from our JAR */
+  /** Get the PYTHONPATH for PySpark from our JAR */
   def sparkPythonPath: String = {
     val pythonPath = new ArrayBuffer[String]
-    for (sparkHome <- sys.env.get("SPARK_HOME")) {
-      pythonPath += Seq(sparkHome, "python", "lib", "pyspark.zip").mkString(File.separator)
-      pythonPath +=
-        Seq(sparkHome, "python", "lib", PY4J_ZIP_NAME).mkString(File.separator)
-    }

Review comment:
       Hey, I don't think we can remove this. I think you refer to Yarn cluster, right? What about standalone mode or other modes?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30281:
URL: https://github.com/apache/spark/pull/30281#issuecomment-724825353


   Thank you for your decision, @warrenzhu25 .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #30281: [SPARK-33374][CORE] Remove unnecessary python path from spark home

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30281:
URL: https://github.com/apache/spark/pull/30281#issuecomment-724423514


   Hi, @warrenzhu25 .
   In addition to @HyukjinKwon 's comment, according to GitHub Action, this seems to break Spark documentation generation too. Shall we close this PR?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org