Configurable, GroupMappingServiceProvider@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class CompositeGroupsMapping
extends java.lang.Object
implements GroupMappingServiceProvider, Configurable
GroupMappingServiceProvider which
composites other group mapping providers for determining group membership.
This allows to combine existing provider implementations and composite
a virtually new provider without customized development to deal with complex situation.| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
MAPPING_PROVIDER_CONFIG_PREFIX |
|
static java.lang.String |
MAPPING_PROVIDERS_COMBINED_CONFIG_KEY |
|
static java.lang.String |
MAPPING_PROVIDERS_CONFIG_KEY |
GROUP_MAPPING_CONFIG_PREFIX| Constructor | Description |
|---|---|
CompositeGroupsMapping() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cacheGroupsAdd(java.util.List<java.lang.String> groups) |
Adds groups to cache, no need to do that for this provider
|
void |
cacheGroupsRefresh() |
Caches groups, no need to do that for this provider
|
Configuration |
getConf() |
Return the configuration used by this object.
|
java.util.List<java.lang.String> |
getGroups(java.lang.String user) |
Returns list of groups for a user.
|
java.util.Set<java.lang.String> |
getGroupsSet(java.lang.String user) |
Get all various group memberships of a given user.
|
void |
setConf(Configuration conf) |
Set the configuration to be used by this object.
|
public static final java.lang.String MAPPING_PROVIDERS_CONFIG_KEY
public static final java.lang.String MAPPING_PROVIDERS_COMBINED_CONFIG_KEY
public static final java.lang.String MAPPING_PROVIDER_CONFIG_PREFIX
public java.util.List<java.lang.String> getGroups(java.lang.String user)
throws java.io.IOException
getGroups in interface GroupMappingServiceProvideruser - get groups for this userjava.io.IOException - raised on errors performing I/O.public void cacheGroupsRefresh()
throws java.io.IOException
cacheGroupsRefresh in interface GroupMappingServiceProviderjava.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 GroupMappingServiceProvidergroups - unusedjava.io.IOException - raised on errors performing I/O.public java.util.Set<java.lang.String> getGroupsSet(java.lang.String user)
throws java.io.IOException
GroupMappingServiceProvidergetGroupsSet in interface GroupMappingServiceProvideruser - User's namejava.io.IOException - raised on errors performing I/O.public Configuration getConf()
ConfigurablegetConf in interface Configurablepublic void setConf(Configuration conf)
ConfigurablesetConf in interface Configurableconf - configuration to be usedCopyright © 2008–2025 Apache Software Foundation. All rights reserved.