Issue Details (XML | Word | Printable)

Key: HADOOP-3099
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Tsz Wo (Nicholas), SZE
Reporter: Tsz Wo (Nicholas), SZE
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

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

Created: 26/Mar/08 11:52 PM   Updated: 21/May/08 08:06 PM
Return to search
Component/s: util
Affects Version/s: None
Fix Version/s: 0.17.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 3099_20080402b.patch 2008-04-03 02:00 AM Tsz Wo (Nicholas), SZE 29 kB
Text File Licensed for inclusion in ASF works 3099_20080402b_0.16.patch 2008-04-08 12:40 AM Tsz Wo (Nicholas), SZE 31 kB

Hadoop Flags: Reviewed
Release Note:
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
Resolution Date: 03/Apr/08 09:07 PM


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

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Tsz Wo (Nicholas), SZE added a comment - 27/Mar/08 12:30 AM - 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.


Sameer Paranjpye added a comment - 27/Mar/08 05:18 AM
+1

Allen Wittenauer added a comment - 27/Mar/08 02:02 PM
-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.

Doug Cutting added a comment - 27/Mar/08 04:25 PM
> -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.


Tsz Wo (Nicholas), SZE added a comment - 28/Mar/08 12:02 AM
messed up the issues

Nigel Daley added a comment - 28/Mar/08 05:29 AM
Not going to make 0.16.2. Moving this 0.17. Could backport to 0.16.3 if there is one.

Robert Chansler added a comment - 28/Mar/08 10:39 PM
0.17? Yes!

Tsz Wo (Nicholas), SZE added a comment - 03/Apr/08 02:00 AM
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

Hadoop QA added a comment - 03/Apr/08 02:14 PM
+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.


Chris Douglas added a comment - 03/Apr/08 08:30 PM
+1 Looks good.

Chris Douglas added a comment - 03/Apr/08 09:07 PM
I just committed this. Thanks, Nicholas!

Hudson added a comment - 05/Apr/08 12:13 PM

Tsz Wo (Nicholas), SZE added a comment - 08/Apr/08 12:40 AM
3099_20080402b_0.16.patch: for 0.16