public class GroupsService extends Object implements Service
org.apache.hadoop.security.Groups
to retrieve the groups a user belongs to.Modifier and Type | Field and Description |
---|---|
static String |
CONF_PREFIX |
DEFAULT_LOCK_TIMEOUT, lockTimeout
Constructor and Description |
---|
GroupsService() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys the service.
|
List<String> |
getGroups(String user)
Returns the list of groups a user belongs to.
|
Class<? extends Service> |
getInterface()
Returns the service interface.
|
void |
init(Services services)
Initializes the service.
|
public static final String CONF_PREFIX
public GroupsService()
public Class<? extends Service> getInterface()
getInterface
in interface Service
GroupService
public List<String> getGroups(String user) throws IOException
user
- user name.IOException
- thrown if there was an error retrieving the groups of the user.Copyright © 2018 Apache Software Foundation. All rights reserved.