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