[
https://issues.apache.org/jira/browse/HDFS-5673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13855934#comment-13855934
]
Haohui Mai commented on HDFS-5673:
----------------------------------
Thanks Chris.
On a high level, I would like to see the code to separate (1) the required
functionality and (2) optimization. Correct me if I'm wrong. For example, It
seems to me that the merge function can look like the following:
{code}
merge(a,b) {
// required functionality
list c = merge list a and b.
sort(c);
// optimization
optimize(c);
}
optimize(d) {
list d;
foreach (entry in c) {
if (the current entry can be merged (e.g., duplication, different mask)
with the previous one) {
update previous entry in d;
} else {
add the entry into d;
}
}
}
{code}
The advantage of this approach is to make reasoning much easier. The required
functionality is relatively straight forward. To reason about optimization,
one only needs to check that it provides semantically equivalent results.
Furthermore, optimization can break down into several passes to improve
readability.
> Implement logic for modification of ACLs.
> -----------------------------------------
>
> Key: HDFS-5673
> URL: https://issues.apache.org/jira/browse/HDFS-5673
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Affects Versions: HDFS ACLs (HDFS-4685)
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Attachments: HDFS-5673.1.patch, HDFS-5673.2.patch, HDFS-5673.3.patch
>
>
> This patch will include the core logic for modification of ACLs. This
> includes support for all user-facing APIs that modify ACLs. This will cover
> access ACLs, default ACLs, automatic mask calculations, automatic inference
> of unprovided default ACL entries, and validation to prevent creation of an
> invalid ACL.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)