You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/04/19 14:12:09 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #40854: [SPARK-43195][CORE] Remove unnecessary serializable wrapper in HadoopFSUtils

LuciferYang commented on code in PR #40854:
URL: https://github.com/apache/spark/pull/40854#discussion_r1171407351


##########
core/src/main/scala/org/apache/spark/util/HadoopFSUtils.scala:
##########
@@ -119,11 +118,10 @@ private[spark] object HadoopFSUtils extends Logging {
           s"Listing leaf files and directories for $s paths:<br/>${paths(0)}, ..."
       }
       sc.setJobDescription(description)
-      sc
-        .parallelize(serializedPaths, numParallelism)
-        .mapPartitions { pathStrings =>
+      sc.parallelize(paths, numParallelism)
+        .mapPartitions { pathsEachPartition =>
           val hadoopConf = serializableConfiguration.value
-          pathStrings.map(new Path(_)).toSeq.map { path =>
+          pathsEachPartition.toSeq.map { path =>

Review Comment:
   Can we remove this `toSeq` and `iterator` in line 136?



-- 
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: reviews-unsubscribe@spark.apache.org

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