GroupMappingServiceProvider@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class JniBasedUnixGroupsNetgroupMapping
extends JniBasedUnixGroupsMapping
GroupMappingServiceProvider
that invokes libC calls to get the group
memberships of a given user.GROUP_MAPPING_CONFIG_PREFIX| Constructor | Description |
|---|---|
JniBasedUnixGroupsNetgroupMapping() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cacheGroupsAdd(java.util.List<java.lang.String> groups) |
Add a group to cache, only netgroups are cached
|
void |
cacheGroupsRefresh() |
Refresh the netgroup cache
|
java.util.List<java.lang.String> |
getGroups(java.lang.String user) |
Gets unix groups and netgroups for the user.
|
protected java.util.List<java.lang.String> |
getUsersForNetgroup(java.lang.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)
|
getGroupsSetpublic java.util.List<java.lang.String> getGroups(java.lang.String user)
throws java.io.IOException
getGroups in interface GroupMappingServiceProvidergetGroups in class JniBasedUnixGroupsMappinguser - User's namejava.io.IOException - raised on errors performing I/O.public void cacheGroupsRefresh()
throws java.io.IOException
cacheGroupsRefresh in interface GroupMappingServiceProvidercacheGroupsRefresh in class JniBasedUnixGroupsMappingjava.io.IOException - raised on errors performing I/O.public void cacheGroupsAdd(java.util.List<java.lang.String> groups)
throws java.io.IOException
cacheGroupsAdd in interface GroupMappingServiceProvidercacheGroupsAdd in class JniBasedUnixGroupsMappinggroups - list of group names to add to cachejava.io.IOException - raised on errors performing I/O.protected java.util.List<java.lang.String> getUsersForNetgroup(java.lang.String netgroup)
netgroup - return users for this netgroupCopyright © 2008–2025 Apache Software Foundation. All rights reserved.