|
||||||||||
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,
String name,
String[] groups)
Generates a new User instance specifically for use in test code. |
|
static User |
getCurrent()
Returns the User instance within current execution context. |
|
String |
getName()
Returns the full user name. |
|
abstract String |
getShortName()
Returns the shortened version of the user name -- the portion that maps to an operating system user name. |
|
abstract
|
runAs(PrivilegedAction<T> action)
Executes the given action within the context of this user. |
|
abstract
|
runAs(PrivilegedExceptionAction<T> action)
Executes the given action within the context of this user. |
|
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 String getName()
public abstract String getShortName()
public abstract <T> T runAs(PrivilegedAction<T> action)
public abstract <T> T runAs(PrivilegedExceptionAction<T> action) throws IOException, InterruptedException
IOException
InterruptedException
public String toString()
toString
in class Object
public static User getCurrent()
User
instance within current execution context.
public static User createUserForTesting(org.apache.hadoop.conf.Configuration conf, String name, 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 |