@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) @InterfaceStability.Evolving public class JniBasedUnixGroupsNetgroupMapping extends JniBasedUnixGroupsMapping
GroupMappingServiceProvider
that invokes libC calls to get the group
memberships of a given user.| Constructor and Description |
|---|
JniBasedUnixGroupsNetgroupMapping() |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheGroupsAdd(List<String> groups)
Add a group to cache, only netgroups are cached
|
void |
cacheGroupsRefresh()
Refresh the netgroup cache
|
List<String> |
getGroups(String user)
Gets unix groups and netgroups for the user.
|
protected List<String> |
getUsersForNetgroup(String netgroup)
Calls JNI function to get users for a netgroup, since C functions
are not reentrant we need to make this synchronized (see
documentation for setnetgrent, getnetgrent and endnetgrent)
|
public List<String> getGroups(String user) throws IOException
getGroups in interface GroupMappingServiceProvidergetGroups in class JniBasedUnixGroupsMappinguser - User's nameIOExceptionpublic void cacheGroupsRefresh()
throws IOException
cacheGroupsRefresh in interface GroupMappingServiceProvidercacheGroupsRefresh in class JniBasedUnixGroupsMappingIOExceptionpublic void cacheGroupsAdd(List<String> groups) throws IOException
cacheGroupsAdd in interface GroupMappingServiceProvidercacheGroupsAdd in class JniBasedUnixGroupsMappinggroups - list of group names to add to cacheIOExceptionprotected List<String> getUsersForNetgroup(String netgroup)
netgroup - return users for this netgroupCopyright © 2013 Apache Software Foundation. All rights reserved.