hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Patel (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-12161) Distcp does not preserve ownership in destination parent folder
Date Wed, 19 Jul 2017 04:35:00 GMT
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.

    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

To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org

View raw message