srowen commented on a change in pull request #35278:
URL: https://github.com/apache/spark/pull/35278#discussion_r790160252



##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -595,7 +593,7 @@ private[spark] object Utils extends Logging {
     if (lowerSrc.endsWith(".jar")) {
       RunJar.unJar(source, dest, RunJar.MATCH_ANY)
     } else if (lowerSrc.endsWith(".zip")) {
-      FileUtil.unZip(source, dest)
+      unZip(source.getAbsoluteFile, dest)

Review comment:
       Why do we need a different code path for unzipping only here and not 
elsewhere?
   I'm also concerned about adding the platform dependency on unzip just for 
this.
   Why does the exec bit need to be set - wouldn't you run a script as `python 
script.py` anyway to be more sure about the python being used?

##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -605,6 +603,22 @@ private[spark] object Utils extends Logging {
     }
   }
 
+  def unZip(inFile: File, untarDir: File): Unit = {
+    val untarCommand = new StringBuffer

Review comment:
       No need for a StringBuffer (StringBuilder is preferred anyway), just use 
an interpolated string




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to