UserGroupInformation (Hadoop 0.20.2+320 API)
Date: 2010-06-28

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 UserGroupInformation

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

All Implemented Interfaces:
  Principal, Writable

Direct Known Subclasses:
  UnixUserGroupInformation

    public abstract class UserGroupInformation

extends Object
implements Writable, Principal

A `Writable` abstract class for storing user and groups information.

Field Summary
`static org.apache.commons.logging.Log` | `LOG`

Constructor Summary
`UserGroupInformation()`

Method Summary
`static UserGroupInformation` | `getCurrentUGI()`
`abstract String[]` | `getGroupNames()` Get the name of the groups that the user belong to
`abstract String` | `getUserName()` Get username
`static UserGroupInformation` | `login(Configuration conf)` Login and return a UserGroupInformation object.
`static UserGroupInformation` | `readFrom(Configuration conf)` Read a `UserGroupInformation` from conf
`static void` | `setCurrentUGI(UserGroupInformation ugi)` Deprecated. Use `setCurrentUser(UserGroupInformation)`
`static void` | `setCurrentUser(UserGroupInformation ugi)` Set the `UserGroupInformation` for the current thread WARNING - This method should be used only in test cases and other exceptional cases!

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

Methods inherited from interface org.apache.hadoop.io.Writable
`readFields, write`

Methods inherited from interface java.security.Principal
`equals, getName, hashCode, toString`

Field Detail

### LOG

    public static final org.apache.commons.logging.Log LOG

Constructor Detail

### UserGroupInformation

    public UserGroupInformation()

Method Detail

### getCurrentUGI

    public static UserGroupInformation getCurrentUGI()

  Returns:
    the `UserGroupInformation` for the current thread

### setCurrentUGI

    @Deprecated
    public static void setCurrentUGI(UserGroupInformation ugi)

  Deprecated. Use `setCurrentUser(UserGroupInformation)`

  Set the `UserGroupInformation` for the current thread

### setCurrentUser

    public static void setCurrentUser(UserGroupInformation ugi)

  Set the `UserGroupInformation` for the current thread WARNING - This method should be used only in test cases and other exceptional cases!

  Parameters:
    `ugi` - `UserGroupInformation` for the current thread

### getUserName

    public abstract String getUserName()

  Get username

  Returns:
    the user's name

### getGroupNames

    public abstract String[] getGroupNames()

  Get the name of the groups that the user belong to

  Returns:
    an array of group names

### login

    public static UserGroupInformation login(Configuration conf)
                                      throws LoginException

  Login and return a UserGroupInformation object.

  Throws:
    `LoginException`

### readFrom

    public static UserGroupInformation readFrom(Configuration conf)
                                         throws IOException

  Read a `UserGroupInformation` from conf

  Throws:
    `IOException`

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