Package org.apache.hadoop.security.token.delegation
Class AbstractDelegationTokenIdentifier
java.lang.Object
org.apache.hadoop.security.token.TokenIdentifier
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier
- All Implemented Interfaces:
Writable
- Direct Known Subclasses:
org.apache.hadoop.yarn.security.client.YARNDelegationTokenIdentifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongabstract TextgetKind()Get the token kindintlonggetOwner()intgetUser()Get the username encoded in the token identifierinthashCode()protected static booleanvoidreadFields(DataInput in) Deserialize the fields of this object fromin.voidsetIssueDate(long issueDate) voidsetMasterKeyId(int newId) voidsetMaxDate(long maxDate) voidvoidsetRealUser(Text realUser) voidsetRenewer(Text renewer) voidsetSequenceNumber(int seqNum) toString()voidwrite(DataOutput out) Serialize the fields of this object toout.Methods inherited from class org.apache.hadoop.security.token.TokenIdentifier
getBytes, getTrackingId
-
Constructor Details
-
AbstractDelegationTokenIdentifier
public AbstractDelegationTokenIdentifier() -
AbstractDelegationTokenIdentifier
-
-
Method Details
-
getKind
Description copied from class:TokenIdentifierGet the token kind- Specified by:
getKindin classTokenIdentifier- Returns:
- the kind of the token
-
getUser
Get the username encoded in the token identifier- Specified by:
getUserin classTokenIdentifier- Returns:
- the username or owner
-
getOwner
-
setOwner
-
getRenewer
-
setRenewer
-
getRealUser
-
setRealUser
-
setIssueDate
public void setIssueDate(long issueDate) -
getIssueDate
public long getIssueDate() -
setMaxDate
public void setMaxDate(long maxDate) -
getMaxDate
public long getMaxDate() -
setSequenceNumber
public void setSequenceNumber(int seqNum) -
getSequenceNumber
public int getSequenceNumber() -
setMasterKeyId
public void setMasterKeyId(int newId) -
getMasterKeyId
public int getMasterKeyId() -
isEqual
-
equals
-
hashCode
public int hashCode() -
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
write
Description copied from interface:WritableSerialize the fields of this object toout.- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
toString
-
toStringStable
-