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

    https://github.com/apache/spark/pull/19294#discussion_r140165731
  
    --- 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 --
    
    Introduced method
    
        /**
         * Checks whether there are files to be committed to an absolute output 
location.
         */
        private def hasAbsPathFiles: Boolean = addedAbsPathFiles != null && 
addedAbsPathFiles.nonEmpty


---

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

Reply via email to