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

Yongjun Zhang commented on HDFS-8828:
-------------------------------------

Hi [~jingzhao],

Thanks for the review and good comments!

Some thoughts:

Currently {{DistCpOptions}} is currently the only vehicle to pass info between 
different stages of distcp. To address your comment 1 & 2, we need to add 
something new to pass additional info (which is derived data, and can be hold 
by a new class) to pass between sync and copyListing stages. To do this, there 
are two choices:

1. Pass an object of this new class as a standalone parameter between stages, 
which require changing quite some method signatures, most of the places don't 
use this new parameter.

2. Put the object of this class as a member of DistCpOptions, so there is no 
need to change method signatures. We can create another new class 
{{DistCpDerivedInput}} to hold derived input, and put all derived data as 
members of {{DistCpDerivedInput}}. If we define DistCpOptions as only holding 
command line options, then then this choice is not perfect; however, if we 
define DistcpOptions as may-contain derived input too, then it's ok.

Which choice you like better? or additional thoughts?

Thanks.






> Utilize Snapshot diff report to build copy list in distcp
> ---------------------------------------------------------
>
>                 Key: HDFS-8828
>                 URL: https://issues.apache.org/jira/browse/HDFS-8828
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: distcp, snapshots
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: HDFS-8828.001.patch, HDFS-8828.002.patch, 
> HDFS-8828.003.patch, HDFS-8828.004.patch, HDFS-8828.005.patch, 
> HDFS-8828.006.patch, HDFS-8828.007.patch
>
>
> Some users reported huge time cost to build file copy list in distcp. (30 
> hours for 1.6M files). We can leverage snapshot diff report to build file 
> copy list including files/dirs which are changes only between two snapshots 
> (or a snapshot and a normal dir). It speed up the process in two folds: 1. 
> less copy list building time. 2. less file copy MR jobs.
> HDFS snapshot diff report provide information about file/directory creation, 
> deletion, rename and modification between two snapshots or a snapshot and a 
> normal directory. HDFS-7535 synchronize deletion and rename, then fallback to 
> the default distcp. So it still relies on default distcp to building complete 
> list of files under the source dir. This patch only puts creation and 
> modification files into the copy list based on snapshot diff report. We can 
> minimize the number of files to copy. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to