java.security.Principal@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class User
extends java.lang.Object
implements java.security.Principal
| Constructor | Description |
|---|---|
User(java.lang.String name) |
|
User(java.lang.String name,
UserGroupInformation.AuthenticationMethod authMethod,
javax.security.auth.login.LoginContext login) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
UserGroupInformation.AuthenticationMethod |
getAuthenticationMethod() |
|
long |
getLastLogin() |
Get the time of the last login.
|
javax.security.auth.login.LoginContext |
getLogin() |
Returns login object
|
java.lang.String |
getName() |
Get the full name of the user.
|
java.lang.String |
getShortName() |
Get the user name up to the first '/' or '@'
|
int |
hashCode() |
|
void |
setAuthenticationMethod(UserGroupInformation.AuthenticationMethod authMethod) |
|
void |
setLastLogin(long time) |
Set the last login time.
|
void |
setLogin(javax.security.auth.login.LoginContext login) |
Set the login object
|
java.lang.String |
toString() |
public User(java.lang.String name)
public User(java.lang.String name,
UserGroupInformation.AuthenticationMethod authMethod,
javax.security.auth.login.LoginContext login)
public java.lang.String getName()
getName in interface java.security.Principalpublic java.lang.String getShortName()
public boolean equals(java.lang.Object o)
equals in interface java.security.Principalequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.security.PrincipalhashCode in class java.lang.Objectpublic java.lang.String toString()
toString in interface java.security.PrincipaltoString in class java.lang.Objectpublic void setAuthenticationMethod(UserGroupInformation.AuthenticationMethod authMethod)
public UserGroupInformation.AuthenticationMethod getAuthenticationMethod()
public javax.security.auth.login.LoginContext getLogin()
public void setLogin(javax.security.auth.login.LoginContext login)
login - public void setLastLogin(long time)
time - the number of milliseconds since the beginning of timepublic long getLastLogin()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.