hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7454) Reduce memory footprint for AclEntries in NameNode
Date Wed, 03 Dec 2014 05:14:12 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14232606#comment-14232606
] 

Haohui Mai commented on HDFS-7454:
----------------------------------

bq. By seeing these AclEntries, caller could easily access by impersonating one of the user
in the entries? Right?

Agree. I think that giving out "Permission Denied" should be sufficient. [~cnauroth], do you
have any comments?

{code}
+  int[] getEntriesInt() {
     return entries;
   }
{code}

The original API guarantees that all contents of {{AclEntry}} are immutable. This is by design
to protect ACL from potential bugs when manipulate {{ACLEntry}}. So far I can see two options
to bring it back. The first one is to return a read-only {{IntBuffer}}, that is:

IntBuffer getEntriesInt() { return IntBuffer.wrap(entries).asReadOnlyBuffer(); }

The second one is to have two calls, {{int getEntryAt()}} and {{int getEntrySize()}} in {{AclFeature}}.
I think either of them will work.

Another question is that do we need to keep {{getEntries()}}? I just checked and it was called
in several places, but it might make sense to just fix them to the int-based APIs.

> Reduce memory footprint for AclEntries in NameNode
> --------------------------------------------------
>
>                 Key: HDFS-7454
>                 URL: https://issues.apache.org/jira/browse/HDFS-7454
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Vinayakumar B
>            Assignee: Vinayakumar B
>         Attachments: HDFS-7454-001.patch, HDFS-7454-002.patch, HDFS-7454-003.patch
>
>
> HDFS-5620 indicated a GlobalAclSet containing unique {{AclFeature}} can be de-duplicated
to save the memory in NameNode. However it was not implemented at that time.
> This Jira re-proposes same implementation, along with de-duplication of unique {{AclEntry}}
across all ACLs.
> One simple usecase is:
> A mapreduce user's home directory with the set of default ACLs, under which lot of other
files/directories could be created when jobs is run. Here all the default ACLs of parent directory
will be duplicated till the explicit delete of those ACLs. With de-duplication,only one object
will be in memory for the same Entry across all ACLs of all files/directories.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message