You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Haohui Mai (JIRA)" <ji...@apache.org> on 2014/02/05 23:18:11 UTC

[jira] [Commented] (HDFS-5616) NameNode: implement default ACL handling.

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

Haohui Mai commented on HDFS-5616:
----------------------------------

A couple comments:

{code}
copyINodeDefaultAcl(INodeDirectory parent, INode child)
{code}

You can pass in child only, and get its parent via {{child.getParent()}}. You might also want to refactor the code to create a path for early return. For example:

{code}
if (!child.isFile() || !child.isDirectory())
  return;
{code}

That gives a clear view of the pre-conditions of the function.

You might want to create some utility functions like {{isMinimalAcl()}} to simplify the code. I think it can be addressed in a separate jira.

One thing that I'm unclear is that the rationales on masking ACL bit on {{OP_ADD}} and {{OP_MKDIR}}. It seems to me that with default ACLs, an add operation will correspond to two edit logs entries. (an {{OP_ADD}} and an {{OP_SET_ACL}}). My concern is that the operation is no longer atomic. If the edit log truncates right before {{OP_SET_ACL}}, the semantic of default ACLs is lost. I'm wondering whether we should create new ops to maintain the atomic guarantee.

> NameNode: implement default ACL handling.
> -----------------------------------------
>
>                 Key: HDFS-5616
>                 URL: https://issues.apache.org/jira/browse/HDFS-5616
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: HDFS ACLs (HDFS-4685)
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-5616.1.patch
>
>
> Implement and test handling of default ACLs within NameNode.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)