[ https://issues.apache.org/jira/browse/MAPREDUCE-6564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15045533#comment-15045533 ]
Tsz Wo Nicholas Sze commented on MAPREDUCE-6564: ------------------------------------------------ Sure, let's discuss how to fix it. BTW, there is a second problem of distcp - The missing directory created somehow inherits the permission of its parent directory but not using umask. {code} $hadoop fs -ls /dst/ drwx------ - szetszwo hdfs 0 2015-12-04 16:24 /dst/non-existing {code} (The permission will be drwxr-xr-x if it is created using umask.) > distcp creates missing perent directories which is inconsistent with fs -cp > --------------------------------------------------------------------------- > > Key: MAPREDUCE-6564 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6564 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Components: distcp > Reporter: Tsz Wo Nicholas Sze > > fs -cp will fail if the destination parent directory does not exist. > {code} > $hadoop fs -cp /a.sh /dst/non-existing/a.sh > cp: `/dst/non-existing/a.sh': No such file or directory > {code} > However, distcp will not fail. It creates the missing parent directory. > {code} > $hadoop distcp /a.sh /dst/non-existing/a.sh > ... > $hadoop fs -ls /dst/non-existing > Found 1 items > -rw-r--r-- 3 szetszwo hdfs 531 2015-12-04 16:24 > /dst/non-existing/a.sh > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)