org.apache.hadoop.security
Class UserGroupInformation
java.lang.Object
org.apache.hadoop.security.UserGroupInformation
- All Implemented Interfaces:
- Writable
- Direct Known Subclasses:
- UnixUserGroupInformation
public abstract class UserGroupInformation
- extends Object
- implements Writable
A Writable abstract class for storing user and groups information.
|
Field Summary |
static org.apache.commons.logging.Log |
LOG
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
UserGroupInformation
public UserGroupInformation()
getCurrentUGI
public static UserGroupInformation getCurrentUGI()
- Returns:
- the
UserGroupInformation for the current thread
setCurrentUGI
public static void setCurrentUGI(UserGroupInformation ugi)
- Set the
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
readFrom
public static UserGroupInformation readFrom(Configuration conf)
throws IOException
- Read a
UserGroupInformation from conf
- Throws:
IOException
Copyright © 2008 The Apache Software Foundation