User.SecureHadoopUser, User.TestingGroups
HBASE_SECURITY_AUTHORIZATION_CONF_KEY, HBASE_SECURITY_CONF_KEY, ugi
构造器和说明 |
---|
SecureHadoopUser() |
SecureHadoopUser(org.apache.hadoop.security.UserGroupInformation ugi) |
SecureHadoopUser(org.apache.hadoop.security.UserGroupInformation ugi,
org.apache.hbase.thirdparty.com.google.common.cache.LoadingCache<String,String[]> cache) |
限定符和类型 | 方法和说明 |
---|---|
static User |
createUserForTesting(org.apache.hadoop.conf.Configuration conf,
String name,
String[] groups) |
String[] |
getGroupNames()
Returns the list of groups of which this user is a member.
|
String |
getShortName()
Returns the shortened version of the user name -- the portion that maps
to an operating system user name.
|
static boolean |
isSecurityEnabled()
Returns the result of
UserGroupInformation.isSecurityEnabled() . |
static void |
login(org.apache.hadoop.conf.Configuration conf,
String fileConfKey,
String principalConfKey,
String localhost)
Obtain credentials for the current process using the configured
Kerberos keytab file and principal.
|
static void |
login(String keytabLocation,
String principalName)
Login through configured keytab and pricipal.
|
<T> T |
runAs(PrivilegedAction<T> action)
Executes the given action within the context of this user.
|
<T> T |
runAs(PrivilegedExceptionAction<T> action)
Executes the given action within the context of this user.
|
addToken, create, equals, getCurrent, getName, getToken, getTokens, getUGI, hashCode, isHBaseSecurityEnabled, isLoginFromKeytab, runAsLoginUser, shouldLoginFromKeytab, toString
public SecureHadoopUser() throws IOException
IOException
public SecureHadoopUser(org.apache.hadoop.security.UserGroupInformation ugi)
public String getShortName()
User
getShortName
在类中 User
public String[] getGroupNames()
User
getGroupNames
在类中 User
public <T> T runAs(PrivilegedAction<T> action)
User
public <T> T runAs(PrivilegedExceptionAction<T> action) throws IOException, InterruptedException
User
runAs
在类中 User
IOException
InterruptedException
public static User createUserForTesting(org.apache.hadoop.conf.Configuration conf, String name, String[] groups)
public static void login(org.apache.hadoop.conf.Configuration conf, String fileConfKey, String principalConfKey, String localhost) throws IOException
conf
- the Configuration to usefileConfKey
- Configuration property key used to store the path
to the keytab fileprincipalConfKey
- Configuration property key used to store the
principal name to login aslocalhost
- the local hostnameIOException
User.login(org.apache.hadoop.conf.Configuration, String, String, String)
public static void login(String keytabLocation, String principalName) throws IOException
keytabLocation
- location of keytabprincipalName
- principal in keytabIOException
- exception from UserGroupInformation.loginUserFromKeytabpublic static boolean isSecurityEnabled()
UserGroupInformation.isSecurityEnabled()
.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.