hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "runlinzhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11764) NPE when the GroupMappingServiceProvider has no group
Date Mon, 31 Jul 2017 22:08:00 GMT

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

runlinzhang commented on HDFS-11764:
------------------------------------

Thank you for your attention´╝îthe version is  branch-2.7.2 

When the default implementation JniBasedUnixGroupsMapping GroupMappingServiceProvider,
And nodemanager does not configure the group for the user, which causes the group to be null,
which makes null judgment to avoid this problem

> NPE when the GroupMappingServiceProvider has no group 
> ------------------------------------------------------
>
>                 Key: HDFS-11764
>                 URL: https://issues.apache.org/jira/browse/HDFS-11764
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.7.2
>            Reporter: runlinzhang
>            Priority: Critical
>             Fix For: 2.7.2
>
>         Attachments: image.png
>
>
> The following code can throw NPE if GroupMappingServiceProvider.getGroups() returns null.
> public List<String> load(String user) throws Exception {
>       List<String> groups = fetchGroupList(user);
>       if (groups.isEmpty()) {
>         if (isNegativeCacheEnabled()) {
>           negativeCache.add(user);
>         }
>         // We throw here to prevent Cache from retaining an empty group
>         throw noGroupsForUser(user);
>       }
>       return groups;
>     }
> eg:image



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message