Xtpacz commented on code in PR #52507:
URL: https://github.com/apache/spark/pull/52507#discussion_r2430988118


##########
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala:
##########
@@ -197,34 +201,76 @@ class HadoopMapReduceCommitProtocol(
       }
       logDebug(s"Create absolute parent directories: $absParentPaths")
       absParentPaths.foreach(fs.mkdirs)
-      for ((src, dst) <- filesToMove) {
-        if (!fs.rename(new Path(src), new Path(dst))) {
-          throw new IOException(s"Failed to rename $src to $dst when 
committing files staged for " +
-            s"absolute locations")
+
+      val numThreads = SparkContext.getActive match {
+        case Some(sc) => sc.conf.get(FILES_RENAME_NUM_THREADS)
+        case None => FILES_RENAME_NUM_THREADS.defaultValue.get
+      }
+      val pool = ThreadUtils.newDaemonFixedThreadPool(numThreads, 
"file-rename")

Review Comment:
   > shall we have a global long-standing thread pool to do this work?
   
   updated. @cloud-fan  could you review this change? Thank you :)



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