Package org.apache.storm.security.auth
Class ShellBasedGroupsMapping
- java.lang.Object
-
- org.apache.storm.security.auth.ShellBasedGroupsMapping
-
- All Implemented Interfaces:
IGroupMappingServiceProvider
public class ShellBasedGroupsMapping extends Object implements IGroupMappingServiceProvider
-
-
Field Summary
Fields Modifier and Type Field Description RotatingMap<String,Set<String>>
cachedGroups
static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description ShellBasedGroupsMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getGroups(String user)
Returns list of groups for a user.void
prepare(Map<String,Object> topoConf)
Invoked once immediately after construction.
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
cachedGroups
public RotatingMap<String,Set<String>> cachedGroups
-
-
Method Detail
-
prepare
public void prepare(Map<String,Object> topoConf)
Invoked once immediately after construction.- Specified by:
prepare
in interfaceIGroupMappingServiceProvider
- Parameters:
topoConf
- Storm configuration
-
getGroups
public Set<String> getGroups(String user) throws IOException
Returns list of groups for a user.- Specified by:
getGroups
in interfaceIGroupMappingServiceProvider
- Parameters:
user
- get groups for this user- Returns:
- list of groups for a given user
- Throws:
IOException
-
-