Github user bikassaha commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19294#discussion_r140151855
  
    --- Diff: 
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
 ---
    @@ -130,17 +130,21 @@ class HadoopMapReduceCommitProtocol(jobId: String, 
path: String)
         val filesToMove = taskCommits.map(_.obj.asInstanceOf[Map[String, 
String]])
           .foldLeft(Map[String, String]())(_ ++ _)
         logDebug(s"Committing files staged for absolute locations 
$filesToMove")
    -    val fs = absPathStagingDir.getFileSystem(jobContext.getConfiguration)
    -    for ((src, dst) <- filesToMove) {
    -      fs.rename(new Path(src), new Path(dst))
    +    if (addedAbsPathFiles != null && addedAbsPathFiles.nonEmpty) {
    --- End diff --
    
    Please consider using a common method instead of duplicating the code in 
the 2 if statements.


---

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

Reply via email to