Configurable, GroupMappingServiceProvider@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class ShellBasedUnixGroupsNetgroupMapping
extends ShellBasedUnixGroupsMapping
GroupMappingServiceProvider
that exec's the groups shell command to fetch the group
memberships of a given user.GROUP_MAPPING_CONFIG_PREFIX| Constructor | Description |
|---|---|
ShellBasedUnixGroupsNetgroupMapping() |
| 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
|
protected java.lang.String |
execShellGetUserForNetgroup(java.lang.String netgroup) |
Calls shell to get users for a netgroup by calling getent
netgroup, this is a low level function that just returns string
that
|
java.util.List<java.lang.String> |
getGroups(java.lang.String user) |
Get unix groups (parent) and netgroups for given user
|
protected java.util.List<java.lang.String> |
getUsersForNetgroup(java.lang.String netgroup) |
Gets users for a netgroup
|
createGroupExecutor, createGroupIDExecutor, getGroupsForUserCommand, getGroupsIDForUserCommand, getGroupsSet, resolveFullGroupNames, setConfgetConfpublic java.util.List<java.lang.String> getGroups(java.lang.String user)
throws java.io.IOException
getGroups in interface GroupMappingServiceProvidergetGroups in class ShellBasedUnixGroupsMappinguser - get groups and netgroups for this userjava.io.IOException - raised on errors performing I/O.public void cacheGroupsRefresh()
throws java.io.IOException
cacheGroupsRefresh in interface GroupMappingServiceProvidercacheGroupsRefresh in class ShellBasedUnixGroupsMappingjava.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 ShellBasedUnixGroupsMappinggroups - 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)
throws java.io.IOException
netgroup - return users for this netgroupjava.io.IOException - raised on errors performing I/O.protected java.lang.String execShellGetUserForNetgroup(java.lang.String netgroup)
throws java.io.IOException
netgroup - get users for this netgroupjava.io.IOException - raised on errors performing I/O.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.