Package org.apache.hadoop.yarn.security
Class NMTokenIdentifier
java.lang.Object
org.apache.hadoop.security.token.TokenIdentifier
org.apache.hadoop.yarn.security.NMTokenIdentifier
- All Implemented Interfaces:
Writable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor needed by RPC/Secret managerNMTokenIdentifier(ApplicationAttemptId appAttemptId, NodeId nodeId, String applicationSubmitter, int masterKeyId) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetKeyId()getKind()Get the token kindorg.apache.hadoop.yarn.proto.YarnSecurityTokenProtos.NMTokenIdentifierProtogetProto()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
-
-
Constructor Details
-
NMTokenIdentifier
public NMTokenIdentifier(ApplicationAttemptId appAttemptId, NodeId nodeId, String applicationSubmitter, int masterKeyId) -
NMTokenIdentifier
public NMTokenIdentifier()Default constructor needed by RPC/Secret manager
-
-
Method Details
-
getApplicationAttemptId
-
getNodeId
-
getApplicationSubmitter
-
getKeyId
public int getKeyId() -
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.
-
getProto
public org.apache.hadoop.yarn.proto.YarnSecurityTokenProtos.NMTokenIdentifierProto getProto() -
hashCode
public int hashCode() -
equals
-
toString
-