Package org.apache.hadoop.yarn.security
Class AMRMTokenIdentifier
java.lang.Object
org.apache.hadoop.security.token.TokenIdentifier
org.apache.hadoop.yarn.security.AMRMTokenIdentifier
- All Implemented Interfaces:
Writable
AMRMTokenIdentifier is the TokenIdentifier to be used by
ApplicationMasters to authenticate to the ResourceManager.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.yarn.security.AMRMTokenIdentifier.Renewer -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetApplicationAttemptId()intgetKeyId()getKind()Get the token kindorg.apache.hadoop.yarn.proto.YarnSecurityTokenProtos.AMRMTokenIdentifierProtogetProto()getUser()Get the Ugi with the username encoded in the token identifierinthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.toString()voidwrite(DataOutput out) Serialize the fields of this object toout.Methods inherited from class org.apache.hadoop.security.token.TokenIdentifier
getBytes, getTrackingId
-
Field Details
-
KIND_NAME
-
-
Constructor Details
-
AMRMTokenIdentifier
public AMRMTokenIdentifier() -
AMRMTokenIdentifier
-
-
Method Details
-
getApplicationAttemptId
-
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.
-
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.
-
getKind
Description copied from class:TokenIdentifierGet the token kind- Specified by:
getKindin classTokenIdentifier- Returns:
- the kind of the token
-
getUser
Description copied from class:TokenIdentifierGet the Ugi with the username encoded in the token identifier- Specified by:
getUserin classTokenIdentifier- Returns:
- the username. null is returned if username in the identifier is empty or null.
-
getKeyId
public int getKeyId() -
getProto
public org.apache.hadoop.yarn.proto.YarnSecurityTokenProtos.AMRMTokenIdentifierProto getProto() -
hashCode
public int hashCode() -
equals
-
toString
-