Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5.0, 2.6.0, 2.7.0, 3.0.0-alpha1
-
None
-
None
Description
In Hadoop 2.5 the behavior of distcp changed when called through code iff the target directory did not exist and update wasn't used and atomic wasn't used.
HADOOP-10459 introduced a change to preserve the root directory attributes. It introduced a derivative property in the options as well as in the configuration whether the target path exists. See https://github.com/apache/hadoop/commit/c5b59477775c797944db4992e8a70289ba2895ed
However, this property is set only when distcp is used through the command line as a ToolRunner in Distcp.run(String[] argv).
The result is that when the target directory doesn't exist (and neither -update nor -atomic options are used) SimplyCopyListing incorrectly assumes that the target directory does exist because the attribute defaults to true. Copying directory a/b/c to xyz results in the creation of a xyx/c directory with the content of c in it, rather than the content of c getting copied into directory xyz directly.
Attachments
Issue Links
- is depended upon by
-
HADOOP-15788 Improve Distcp for long-haul/cloud deployments
- Open
- relates to
-
HADOOP-10459 distcp V2 doesn't preserve root dir's attributes when -p is specified
- Closed