Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-3099

Need new options in distcp for preserving ower, group and permission

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.17.0
    • Component/s: util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Added a new option -p to distcp for preserving file/directory status.
      -p[rbugp] Preserve status
                             r: replication number
                             b: block size
                             u: user
                             g: group
                             p: permission
                             -p alone is equivalent to -prbugp
      Show
      Added a new option -p to distcp for preserving file/directory status. -p[rbugp] Preserve status                        r: replication number                        b: block size                        u: user                        g: group                        p: permission                        -p alone is equivalent to -prbugp

      Description

      Currently, distcp -p preserves replication# and block size. Since permissions are introduced, distcp should provide options for preserving ower, group and permission.

      1. 3099_20080402b.patch
        29 kB
        Tsz Wo Nicholas Sze
      2. 3099_20080402b_0.16.patch
        31 kB
        Tsz Wo Nicholas Sze

        Activity

        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment - - edited

        I suggest changing -p to -p[rbugp]:
        r: replication#
        b: block size
        u: user
        g: group
        p: permission

        -p alone means -prb for backward compatibility.

        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - - edited I suggest changing -p to -p [rbugp] : r: replication# b: block size u: user g: group p: permission -p alone means -prb for backward compatibility.
        Hide
        sameerp Sameer Paranjpye added a comment -

        +1

        Show
        sameerp Sameer Paranjpye added a comment - +1
        Hide
        aw Allen Wittenauer added a comment -

        -p should include ugp by default. Pretty much EVERY standard UNIX command uses -p == permissions (tar, pax, cp, scp, ... ). This is going to be expected behavior. Anything less is going to be extremely confusing and cause endless issues.

        Show
        aw Allen Wittenauer added a comment - -p should include ugp by default. Pretty much EVERY standard UNIX command uses -p == permissions (tar, pax, cp, scp, ... ). This is going to be expected behavior. Anything less is going to be extremely confusing and cause endless issues.
        Hide
        cutting Doug Cutting added a comment -

        > -p should include ugp by default.

        +1 This is a change from current behaviour, but I'd argue it's a bugfix rather than an incompatibility and I'd be very surprised if it creates any problems.

        Show
        cutting Doug Cutting added a comment - > -p should include ugp by default. +1 This is a change from current behaviour, but I'd argue it's a bugfix rather than an incompatibility and I'd be very surprised if it creates any problems.
        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment -

        messed up the issues

        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - messed up the issues
        Hide
        nidaley Nigel Daley added a comment -

        Not going to make 0.16.2. Moving this 0.17. Could backport to 0.16.3 if there is one.

        Show
        nidaley Nigel Daley added a comment - Not going to make 0.16.2. Moving this 0.17. Could backport to 0.16.3 if there is one.
        Hide
        chansler Robert Chansler added a comment -

        0.17? Yes!

        Show
        chansler Robert Chansler added a comment - 0.17? Yes!
        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment -

        3099_20080402b.patch:

        -p[rbugp]              Preserve status
                               r: replication number
                               b: block size
                               u: user
                               g: group
                               p: permission
                               -p alone is equivalent to -prbugp
        
        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - 3099_20080402b.patch: -p[rbugp] Preserve status r: replication number b: block size u: user g: group p: permission -p alone is equivalent to -prbugp
        Hide
        hadoopqa Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12379223/3099_20080402b.patch
        against trunk revision 643282.

        @author +1. The patch does not contain any @author tags.

        tests included +1. The patch appears to include 6 new or modified tests.

        javadoc +1. The javadoc tool did not generate any warning messages.

        javac +1. The applied patch does not generate any new javac compiler warnings.

        release audit +1. The applied patch does not generate any new release audit warnings.

        findbugs +1. The patch does not introduce any new Findbugs warnings.

        core tests +1. The patch passed core unit tests.

        contrib tests +1. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12379223/3099_20080402b.patch against trunk revision 643282. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 6 new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2138/console This message is automatically generated.
        Hide
        chris.douglas Chris Douglas added a comment -

        +1 Looks good.

        Show
        chris.douglas Chris Douglas added a comment - +1 Looks good.
        Hide
        chris.douglas Chris Douglas added a comment -

        I just committed this. Thanks, Nicholas!

        Show
        chris.douglas Chris Douglas added a comment - I just committed this. Thanks, Nicholas!
        Hide
        hudson Hudson added a comment -
        Show
        hudson Hudson added a comment - Integrated in Hadoop-trunk #451 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/451/ )
        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment -

        3099_20080402b_0.16.patch: for 0.16

        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - 3099_20080402b_0.16.patch: for 0.16

          People

          • Assignee:
            szetszwo Tsz Wo Nicholas Sze
            Reporter:
            szetszwo Tsz Wo Nicholas Sze
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development