|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.security.User
public abstract class User
Wrapper to abstract out usage of user and group information in HBase.
This class provides a common interface for interacting with user and group
information across changing APIs in different versions of Hadoop. It only
provides access to the common set of functionality in
UserGroupInformation currently needed by
HBase, but can be extended as needs change.
Note: this class does not attempt to support any of the Kerberos authentication methods exposed in security-enabled Hadoop (for the moment at least), as they're not yet needed. Properly supporting authentication is left up to implementation in secure HBase.
| Field Summary | |
|---|---|
protected org.apache.hadoop.security.UserGroupInformation |
ugi
|
| Constructor Summary | |
|---|---|
User()
|
|
| Method Summary | ||
|---|---|---|
static User |
createUserForTesting(org.apache.hadoop.conf.Configuration conf,
java.lang.String name,
java.lang.String[] groups)
Generates a new User instance specifically for use in test code. |
|
static User |
getCurrent()
Returns the User instance within current execution context. |
|
java.lang.String |
getName()
Returns the full user name. |
|
abstract java.lang.String |
getShortName()
Returns the shortened version of the user name -- the portion that maps to an operating system user name. |
|
abstract
|
runAs(java.security.PrivilegedAction<T> action)
Executes the given action within the context of this user. |
|
abstract
|
runAs(java.security.PrivilegedExceptionAction<T> action)
Executes the given action within the context of this user. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.hadoop.security.UserGroupInformation ugi
| Constructor Detail |
|---|
public User()
| Method Detail |
|---|
public java.lang.String getName()
public abstract java.lang.String getShortName()
public abstract <T> T runAs(java.security.PrivilegedAction<T> action)
public abstract <T> T runAs(java.security.PrivilegedExceptionAction<T> action)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static User getCurrent()
User instance within current execution context.
public static User createUserForTesting(org.apache.hadoop.conf.Configuration conf,
java.lang.String name,
java.lang.String[] groups)
User instance specifically for use in test code.
name - the full usernamegroups - the group names to which the test user will belong
User instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||