Sailesh Patel created HDFS-12161:
------------------------------------
Summary: Distcp does not preserve ownership in destination parent
folder
Key: HDFS-12161
URL: https://issues.apache.org/jira/browse/HDFS-12161
Project: Hadoop HDFS
Issue Type: Improvement
Components: hdfs
Affects Versions: 2.6.0
Reporter: Sailesh Patel
Priority: Minor
After running distcp as user 'usertest' which is a hdfs superuser, the
destination folder ownership is not preserved.
e.g.
hadoop distcp -pugpaxt -update -skipcrccheck /tmp/usertest
/tmp/new_user/usertest_copy
After distcp is executed, the parent folder has ownership with 'usertest' :
drwxr-xr-x - usertest supergroup 0 2017-07-13 22:09
/tmp/new_user/usertest_copy
and the actual files copied by distcp preserved the permissions:
drwxr-xr-x - hive hive 0 2017-07-13 22:09
/tmp/new_user/usertest_copy/dir1
-rw-r--r-- 1 hdfs hive 287 2017-07-13 22:09
/tmp/new_user/usertest_copy/test1.txt
The distcp options (-pugpaxt) does not apply to the destination parent
directory specified in the distcp command e.g. "/tmp/new_user/usertest_copy"
Can we document this in https://hadoop.apache.org/docs/r1.2.1/distcp2.html
Under : Command Line Options
The destination folder location needs to be pre-created with correct
ownership/permissions before using distcp. The preserve options do not apply
to parent folder.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]