[
https://issues.apache.org/jira/browse/HADOOP-10459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13958837#comment-13958837
]
Hudson commented on HADOOP-10459:
---------------------------------
SUCCESS: Integrated in Hadoop-Hdfs-trunk #1720 (See
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/1720/])
HADOOP-10459. distcp V2 doesn't preserve root dir's attributes when -p is
specified. Contributed by Yongjun Zhang. (atm:
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1584227)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpConstants.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyCommitter.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestCopyListing.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestDistCpSystem.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestDistCpViewFs.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestFileBasedCopyListing.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestGlobbedCopyListing.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestIntegration.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestOptionsParser.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyCommitter.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestUniformSizeInputFormat.java
*
/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/lib/TestDynamicInputFormat.java
> distcp V2 doesn't preserve root dir's attributes when -p is specified
> ---------------------------------------------------------------------
>
> Key: HADOOP-10459
> URL: https://issues.apache.org/jira/browse/HADOOP-10459
> Project: Hadoop Common
> Issue Type: Bug
> Components: tools/distcp
> Affects Versions: 2.3.0
> Reporter: Yongjun Zhang
> Assignee: Yongjun Zhang
> Fix For: 2.5.0
>
> Attachments: HDFS-6152.001.patch, HDFS-6152.002.patch,
> HDFS-6152.002.patch, HDFS-6152.003.patch
>
>
> Two issues were observed with distcpV2
> ISSUE 1. when copying a source dir to target dir with "-pu" option using
> command
> "distcp -pu source-dir target-dir"
>
> The source dir's owner is not preserved at target dir. Simiarly other
> attributes of source dir are not preserved. Supposedly they should be
> preserved when no -update and no -overwrite specified.
> There are two scenarios with the above command:
> a. when target-dir already exists. Issuing the above command will result in
> target-dir/source-dir (source-dir here refers to the last component of the
> source-dir path in the command line) at target file system, with all contents
> in source-dir copied to under target-dir/src-dir. The issue in this case is,
> the attributes of src-dir is not preserved.
> b. when target-dir doesn't exist. It will result in target-dir with all
> contents of source-dir copied to under target-dir. This issue in this case
> is, the attributes of source-dir is not carried over to target-dir.
> For multiple source cases, e.g., command
> "distcp -pu source-dir1 source-dir2 target-dir"
> No matter whether the target-dir exists or not, the multiple sources are
> copied to under the target dir (target-dir is created if it didn't exist).
> And their attributes are preserved.
> ISSUE 2. with the following command:
> "distcp source-dir target-dir"
> when source-dir is an empty directory, and when target-dir doesn't exist,
> source-dir is not copied, actually the command behaves like a no-op. However,
> when the source-dir is not empty, it would be copied and results in
> target-dir at the target file system containing a copy of source-dir's
> children.
> To be consistent, empty source dir should be copied too. Basically the above
> distcp command should cause target-dir get created at target file system, and
> the source-dir's attributes are preserved at target-dir when -p is passed.
--
This message was sent by Atlassian JIRA
(v6.2#6252)