Groups (Hadoop 0.20.2-cdh3u5 API)
Date: 2012-10-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.security
Class Groups

    java.lang.Object
      org.apache.hadoop.security.Groups

    public class Groups

extends Object

A user-to-groups mapping service. `Groups` allows for server to get the various group memberships of a given user via the `getGroups(String)` call, thus ensuring a consistent user-to-groups mapping and protects against vagaries of different mappings on servers and clients in a Hadoop cluster.

Constructor Summary
`Groups(Configuration conf)`

Method Summary
`void` | `cacheGroupsAdd(List<String> groups)`
`List<String>` | `getGroups(String user)` Get the group memberships of a given user.
`static Groups` | `getUserToGroupsMappingService()` Get the groups being used to map user-to-groups.
`static Groups` | `getUserToGroupsMappingService(Configuration conf)`
`void` | `refresh()` Refresh all user-to-groups mappings.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Groups

    public Groups(Configuration conf)

Method Detail

### getGroups

    public List<String> getGroups(String user)
                           throws IOException

  Get the group memberships of a given user.

  Parameters:
    `user` - User's name
  Returns:
    the group memberships of the user
  Throws:
    `IOException`

### refresh

    public void refresh()

  Refresh all user-to-groups mappings.

### cacheGroupsAdd

    public void cacheGroupsAdd(List<String> groups)

### getUserToGroupsMappingService

    public static Groups getUserToGroupsMappingService()

  Get the groups being used to map user-to-groups.

  Returns:
    the groups being used to map user-to-groups.

### getUserToGroupsMappingService

    public static Groups getUserToGroupsMappingService(Configuration conf)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation