[ 
https://issues.apache.org/jira/browse/HADOOP-17611?focusedWorklogId=580798&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580798
 ]

ASF GitHub Bot logged work on HADOOP-17611:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Apr/21 06:50
            Start Date: 12/Apr/21 06:50
    Worklog Time Spent: 10m 
      Work Description: 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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 580798)
    Time Spent: 1h 10m  (was: 1h)

> Distcp parallel file copy breaks the modification time
> ------------------------------------------------------
>
>                 Key: HADOOP-17611
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17611
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Adam Maroti
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The commit HADOOP-11794. Enable distcp to copy blocks in parallel. 
> (bf3fb585aaf2b179836e139c041fc87920a3c886) broke the modification time of 
> large files.
>  
> In CopyCommitter.java inside concatFileChunks Filesystem.concat is called 
> which changes the modification time therefore the modification times of files 
> copeid by distcp will not match the source files. However this only occurs 
> for large enough files, which are copied by splitting them up by distcp.
> In concatFileChunks before calling concat extract the modification time and 
> apply that to the concatenated result-file after the concat. (probably best 
> -after- before the rename()).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to