Example usage for Java org.apache.hadoop.security UserGroupInformation fields, constructors, methods, implement or subclass
The text is from its open source code.
String | HADOOP_TOKEN_FILE_LOCATION Environment variable pointing to the token cache file |
void | addCredentials(Credentials credentials) Add the given Credentials to this user. |
boolean | addToken(Token extends TokenIdentifier> token) Add a token to this UGI |
boolean | addToken(Text alias, Token extends TokenIdentifier> token) Add a named token to this UGI |
boolean | addTokenIdentifier(TokenIdentifier tokenId) Add a TokenIdentifier to this UGI. |
void | checkTGTAndReloginFromKeytab() Re-login a user from keytab if TGT is expired or is close to expiry. |
UserGroupInformation | createProxyUser(String user, UserGroupInformation realUser) Create a proxy user using username of the effective user and the ugi of the real user. |
UserGroupInformation | createProxyUserForTesting(String user, UserGroupInformation realUser, String[] userGroups) Create a proxy user UGI for testing HDFS and MapReduce |
UserGroupInformation | createRemoteUser(String user) Create a user from a login name. |
UserGroupInformation | createUserForTesting(String user, String[] userGroups) Create a UGI for testing HDFS and MapReduce |
T | doAs(PrivilegedAction Run the given action as the user. |
T | doAs(PrivilegedExceptionAction Run the given action as the user, potentially throwing an exception. |
boolean | equals(Object o) Compare the subjects to see if they are equal to each other. |
AuthenticationMethod | getAuthenticationMethod() Get the authentication method from the subject |
UserGroupInformation | getBestUGI(String ticketCachePath, String user) Find the most appropriate UserGroupInformation to use |
Credentials | getCredentials() Obtain the tokens in credentials form associated with this user. |
UserGroupInformation | getCurrentUser() Return the current user, including any doAs in the current stack. |
String[] | getGroupNames() Get the group names for this user. |
UserGroupInformation | getLoginUser() Get the currently logged in user. |
UserGroupInformation | getRealUser() get RealUser (vs. |
String | getShortUserName() Get the user's login name. |
Set | getTokenIdentifiers() Get the set of TokenIdentifiers belonging to this UGI |
Collection | getTokens() Obtain the collection of tokens associated with this user. |
UserGroupInformation | getUGIFromSubject(Subject subject) Create a UserGroupInformation from a Subject with Kerberos principal. |
UserGroupInformation | getUGIFromTicketCache(String ticketCache, String user) Create a UserGroupInformation from a Kerberos ticket cache. |
String | getUserName() Get the user's full principal name. |
int | hashCode() Return the hash of the subject. |
boolean | hasKerberosCredentials() checks if logged in using kerberos |
boolean | isFromKeytab() Is this user logged in from a keytab file managed by the UGI? |
boolean | isLoginKeytabBased() Did the login happen via keytab |
boolean | isLoginTicketBased() Did the login happen via ticket cache |
boolean | isSecurityEnabled() Determine if UserGroupInformation is using Kerberos to determine user identities or is relying on simple authentication |
void | loginUserFromKeytab(String user, String path) Log a user in from a keytab file. |
UserGroupInformation | loginUserFromKeytabAndReturnUGI(String user, String path) Log a user in from a keytab file. |
void | loginUserFromSubject(Subject subject) Log in a user using the given subject |
void | reloginFromKeytab() Re-Login a user in from a keytab file. |
void | reloginFromTicketCache() Re-Login a user in from the ticket cache. |
void | reset() |
void | setAuthenticationMethod(AuthenticationMethod authMethod) Sets the authentication method in the subject |
void | setAuthenticationMethod(AuthMethod authMethod) Sets the authentication method in the subject |
void | setConfiguration(Configuration conf) Set the static configuration for UGI. |
void | setLoginUser(UserGroupInformation ugi) |
String | toString() Return the username. |