@InterfaceAudience.Private public class BlockTokenIdentifier extends TokenIdentifier
Modifier and Type | Class and Description |
---|---|
static class |
BlockTokenIdentifier.Renewer |
Constructor and Description |
---|
BlockTokenIdentifier() |
BlockTokenIdentifier(String userId,
String bpid,
long blockId,
EnumSet<BlockTokenSecretManager.AccessMode> modes) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
EnumSet<BlockTokenSecretManager.AccessMode> |
getAccessModes() |
long |
getBlockId() |
String |
getBlockPoolId() |
byte[] |
getBytes()
Get the bytes for the token identifier
|
long |
getExpiryDate() |
int |
getKeyId() |
Text |
getKind()
Get the token kind
|
UserGroupInformation |
getUser()
Get the Ugi with the username encoded in the token identifier
|
String |
getUserId() |
int |
hashCode() |
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
void |
setExpiryDate(long expiryDate) |
void |
setKeyId(int keyId) |
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
getTrackingId
public BlockTokenIdentifier()
public BlockTokenIdentifier(String userId, String bpid, long blockId, EnumSet<BlockTokenSecretManager.AccessMode> modes)
public Text getKind()
TokenIdentifier
getKind
in class TokenIdentifier
public UserGroupInformation getUser()
TokenIdentifier
getUser
in class TokenIdentifier
public long getExpiryDate()
public void setExpiryDate(long expiryDate)
public int getKeyId()
public void setKeyId(int keyId)
public String getUserId()
public String getBlockPoolId()
public long getBlockId()
public EnumSet<BlockTokenSecretManager.AccessMode> getAccessModes()
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in
- DataInput
to deseriablize this object from.IOException
public void write(DataOutput out) throws IOException
Writable
out
.out
- DataOuput
to serialize this object into.IOException
public byte[] getBytes()
TokenIdentifier
getBytes
in class TokenIdentifier
Copyright © 2013 Apache Software Foundation. All rights reserved.