jojochuang commented on a change in pull request #2892:
URL: https://github.com/apache/hadoop/pull/2892#discussion_r611367826



##########
File path: 
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyCommitter.java
##########
@@ -635,7 +635,10 @@ private void concatFileChunks(Configuration conf, Path 
sourceFile,
         ++i;
       }
     }
+    long firstChunkLastModifiedTs = dstfs.getFileStatus(firstChunkFile)
+        .getModificationTime();
     dstfs.concat(firstChunkFile, restChunkFiles);
+    dstfs.setTimes(firstChunkFile, firstChunkLastModifiedTs, -1);

Review comment:
       Ah. interesting. Thanks for pointing out. I wasn't aware of that.
   But I guess that makes sense for HDFS, since after rename, we update the 
quota for src and dest parent directory, so we do need to update mtime for them.
   
   however, we need to support other file systems and it's not clear how they 
implement it.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to