@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) @InterfaceStability.Evolving public class ShellBasedUnixGroupsNetgroupMapping extends ShellBasedUnixGroupsMapping
GroupMappingServiceProvider
that exec's the groups shell command to fetch the group
memberships of a given user.| Constructor and Description |
|---|
ShellBasedUnixGroupsNetgroupMapping() |
| 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
|
protected String |
execShellGetUserForNetgroup(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
|
List<String> |
getGroups(String user)
Get unix groups (parent) and netgroups for given user
|
protected List<String> |
getUsersForNetgroup(String netgroup)
Gets users for a netgroup
|
public List<String> getGroups(String user) throws IOException
getGroups in interface GroupMappingServiceProvidergetGroups in class ShellBasedUnixGroupsMappinguser - get groups and netgroups for this userIOExceptionpublic void cacheGroupsRefresh()
throws IOException
cacheGroupsRefresh in interface GroupMappingServiceProvidercacheGroupsRefresh in class ShellBasedUnixGroupsMappingIOExceptionpublic void cacheGroupsAdd(List<String> groups) throws IOException
cacheGroupsAdd in interface GroupMappingServiceProvidercacheGroupsAdd in class ShellBasedUnixGroupsMappinggroups - list of group names to add to cacheIOExceptionprotected List<String> getUsersForNetgroup(String netgroup) throws IOException
netgroup - return users for this netgroupIOExceptionprotected String execShellGetUserForNetgroup(String netgroup) throws IOException
netgroup - get users for this netgroupIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.