Class DelegationTokenIdentifier
java.lang.Object
org.apache.zookeeper.server.token.DelegationTokenIdentifier
Identifier of a ZooKeeper delegation token.
The binary layout is byte-compatible with the Writable encoding of Hadoop's
AbstractDelegationTokenIdentifier: Text owner, Text renewer, Text realUser,
vlong issueDate, vlong maxDate, vint sequenceNumber, vint masterKeyId. This lets
external tooling wrap the identifier into a Hadoop Token without re-encoding,
while the ZooKeeper core stays free of hadoop-common dependencies.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDelegationTokenIdentifier(String owner, String renewer, String realUser, long issueDate, long maxDate, int sequenceNumber, int masterKeyId) -
Method Summary
-
Field Details
-
KIND
- See Also:
-
-
Constructor Details
-
DelegationTokenIdentifier
-
-
Method Details
-
getOwner
-
getRenewer
-
getRealUser
-
getIssueDate
public long getIssueDate() -
getMaxDate
public long getMaxDate() -
getSequenceNumber
public int getSequenceNumber() -
getMasterKeyId
public int getMasterKeyId() -
toBytes
public byte[] toBytes()Serializes this identifier into the Hadoop-compatible Writable form. -
fromBytes
Parses an identifier from its Writable form. The parse is strict: the whole buffer must be consumed and the owner must be non-empty, so arbitrary usernames do not accidentally decode into a valid identifier.- Throws:
IOException- if the buffer is not a well-formed identifier
-
equals
-
hashCode
public int hashCode() -
toString
-