org.apache.oozie.service
Class GroupsService

java.lang.Object
  extended by org.apache.oozie.service.GroupsService
All Implemented Interfaces:
Service

public class GroupsService
extends Object
implements Service

The GroupsService class delegates to the Hadoop's org.apache.hadoop.security.Groups to retrieve the groups a user belongs to.


Field Summary
static String CONF_PREFIX
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
GroupsService()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_PREFIX

public static final String CONF_PREFIX
See Also:
Constant Field Values
Constructor Detail

GroupsService

public GroupsService()
Method Detail

getInterface

public Class<? extends Service> getInterface()
Returns the service interface.

Specified by:
getInterface in interface Service
Returns:
GroupService

init

public void init(Services services)
Initializes the service.

Specified by:
init in interface Service
Parameters:
services - services singleton initializing the service.

destroy

public void destroy()
Destroys the service.

Specified by:
destroy in interface Service

getGroups

public List<String> getGroups(String user)
                       throws IOException
Returns the list of groups a user belongs to.

Parameters:
user - user name.
Returns:
the groups the given user belongs to.
Throws:
IOException - thrown if there was an error retrieving the groups of the user.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.