[
https://issues.apache.org/jira/browse/HDFS-5758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated HDFS-5758:
--------------------------------
Attachment: HDFS-5758.1.patch
I'm attaching a v1 patch as a preview. This isn't ready to commit yet, because
I'm still working on tests, but I wanted to show where this is going. Summary
of changes:
# {{AclStorage}}: This is a new class that encapsulates the way we store ACLs
to inodes in memory, using a combination of the {{FsPermission}} bits and
explicit {{AclEntry}} instances stored inside an {{AclFeature}}.
# {{FSNamesystem}} and {{FSDirectory}}: This completes wiring of all ACL APIs.
The new {{FSDirectory}} methods read the current ACL, change it using a method
of {{AclTransformation}} and then update the inode for the new ACL.
{{removeAcl}} is still an exception in that it can be implemented without help
from {{AclTransformation}}.
# {{ScopedAclEntries}}: This is a new class that takes care of splitting an ACL
into separate ranges of the access entries and the default entries. Some of
the logic was refactored out of {{AclTransformation}}.
# {{AclTestHelpers}}: This refactors some test helpers out of
{{TestAclTransformation}}.
# {{TestNameNodeAcl}} and {{TestFSImageWithAcl}}: These tests needed to be
updated to avoid trying to produce an invalid ACL. Previously, this didn't
matter, but now we have the real logic listening on the other side and doing
validation, so this was throwing an error.
[~wheat9], I know you expressed interest in seeing the implementation avoid
touching existing code paths like {{FSNamesystem#setPermission}} as much as
possible. I think this patch achieves it. See the comments in {{AclStorage}}
for the full explanation.
> NameNode: complete implementation of inode modifications for ACLs.
> ------------------------------------------------------------------
>
> Key: HDFS-5758
> URL: https://issues.apache.org/jira/browse/HDFS-5758
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Affects Versions: HDFS ACLs (HDFS-4685)
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Attachments: HDFS-5758.1.patch
>
>
> This patch will complete the remaining logic for the ACL get and set APIs,
> including remaining work in {{FSNamesystem}}, {{FSDirectory}} and storage in
> the inodes.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)