hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7476) Consolidate ACL-related operations to a single class
Date Sat, 06 Dec 2014 00:26:12 GMT

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

Chris Nauroth commented on HDFS-7476:
-------------------------------------

I could be mistaken, but I don't think Mockito can mock static methods.  Instead, we might
need to mock {{FSDirectory#getPermissionChecker}} to return a mock {{FSPermissionChecker}}
that always throws {{AccessControlException}}.

I'm seeing a failure in {{TestNameNodeAcl#testGetAclStatusRequiresTraverseOrSuper}}.  It's
expecting access to be denied for a user, but it's not happening.  I think this passed in
the v0 patch, but I can't yet explain why the changes in the v2 patch would have caused it
to fail.

One minor behavioral change is that checking the ACL configuration flag used to happen outside
of the {{FSNamesystem}} lock.  With this patch, it will happen inside the {{FSNamesystem}}
write lock.  The rationale for doing it outside of the lock is that it's controlled by configuration
that can't change throughout the process lifetime, so it's safe and marginally faster to check
it outside of the lock.  I think it's fine to do it this way though if it's your preference.
 I doubt this would cause noticeable lock contention.

Thank you for doing these refactorings.  It's looking good.

> Consolidate ACL-related operations to a single class
> ----------------------------------------------------
>
>                 Key: HDFS-7476
>                 URL: https://issues.apache.org/jira/browse/HDFS-7476
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-7476.000.patch, HDFS-7476.001.patch, HDFS-7476.002.patch
>
>
> This jira proposes to consolidate ACL-related operations scattered in {{FSNamesystem}}
and {{FSDirectory}} into a single class.



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

Mime
View raw message