[
https://issues.apache.org/jira/browse/HADOOP-10557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030885#comment-14030885
]
Chris Nauroth commented on HADOOP-10557:
----------------------------------------
Nice work, Akira! I really appreciate you making the suggested changes. Here
are a few comments on v4:
# Minor nitpick: let's rename {{FileAttribute#ACLS}} to {{FileAttribute#ACL}}
(singular). This will make it consistent with similar code in distcp. The
singular is more correct too. A file has only one access control list, though
it may contain multiple entries.
# {{CommandWithDestination}}: We can make an optimization by checking
{{src.stat.getPermission().getAclBit()}} before calling
{{src.fs.getAclStatus}}. This will save some RPC load for the NameNode and
reduce latency for the client. See {{DistCpUtils#toCopyListingFileStatus}} for
an example of similar logic checking the ACL bit.
# Speaking of the ACL bit, let's add assertions on the ACL bit in your new
tests. Every time you assert the ACL entries are empty, let's also assert that
the ACL bit is false. Every time the ACL entries are non-empty, assert that
the ACL bit is true.
# Nice catch on what looks like an old typo in the test checking {{target1}}
when it should be checking {{target3}}!
# Can you please also write a test that includes a file with both ACL and
sticky bit? {{setAcl}} cannot set the sticky bit. Only {{setPermission}} can
do it. I think your logic for handling this is already correct, but let's add
a test to make sure and guard against regressions in the future.
> FsShell -cp -p does not preserve extended ACLs
> ----------------------------------------------
>
> Key: HADOOP-10557
> URL: https://issues.apache.org/jira/browse/HADOOP-10557
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 2.4.0
> Reporter: Akira AJISAKA
> Assignee: Akira AJISAKA
> Attachments: HADOOP-10557.2.patch, HADOOP-10557.3.patch,
> HADOOP-10557.4.patch, HADOOP-10557.patch
>
>
> This issue tracks enhancing FsShell cp to add a new command-line option (-pa)
> for preserving extended ACLs.
--
This message was sent by Atlassian JIRA
(v6.2#6252)