[ 
https://issues.apache.org/jira/browse/HADOOP-15209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399897#comment-16399897
 ] 

Aaron Fabbri commented on HADOOP-15209:
---------------------------------------

Nice work here [[email protected]].  I did a quick re-review of the latest 
patch. +1 LGTM.

{noformat}
+      if (sourceChecksum != null) {
+        // iff there's a source checksum, look for one at the destination.
+        targetChecksum = targetFS.getFileChecksum(target);
+      }
{noformat}

Nice little optimization here.

I ran the hadoop-distcp unit tests and also did some manual distcp testing from 
local fs to s3a.  I uploaded a 4-deep directory tree of about ~350 files and 
directories to two s3a subdirs. Next I deleted 3/4 of the source (local) 
directory tree and ran distcp -update -delete with and without this patch.  
Significantly faster (about 4x) for that phase with the patch.  (1 minute 18 
second wall time with patch, 5 minute 42 second w/o patch).

Still running through the unit / integration tests.. Will update in next hour 
if I see any issues.  I'm happy to commit this if you are ready, just shout.

> DistCp to eliminate needless deletion of files under already-deleted 
> directories
> --------------------------------------------------------------------------------
>
>                 Key: HADOOP-15209
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15209
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: tools/distcp
>    Affects Versions: 2.9.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Major
>         Attachments: HADOOP-15209-001.patch, HADOOP-15209-002.patch, 
> HADOOP-15209-003.patch, HADOOP-15209-004.patch, HADOOP-15209-005.patch, 
> HADOOP-15209-006.patch, HADOOP-15209-007.patch
>
>
> DistCP issues a delete(file) request even if is underneath an already deleted 
> directory. This generates needless load on filesystems/object stores, and, if 
> the store throttles delete, can dramatically slow down the delete operation.
> If the distcp delete operation can build a history of deleted directories, 
> then it will know when it does not need to issue those deletes.
> Care is needed here to make sure that whatever structure is created does not 
> overload the heap of the process.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to