Class DelegationKey
java.lang.Object
org.apache.hadoop.security.token.delegation.DelegationKey
- All Implemented Interfaces:
Writable
@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class DelegationKey
extends Object
implements Writable
Key used for generating and verifying delegation tokens
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructore required for WritableDelegationKey(int keyId, long expiryDate, byte[] encodedKey) DelegationKey(int keyId, long expiryDate, SecretKey key) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]longgetKey()intgetKeyId()inthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.voidsetExpiryDate(long expiryDate) voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
DelegationKey
public DelegationKey()Default constructore required for Writable -
DelegationKey
-
DelegationKey
public DelegationKey(int keyId, long expiryDate, byte[] encodedKey)
-
-
Method Details
-
getKeyId
public int getKeyId() -
getExpiryDate
public long getExpiryDate() -
getKey
-
getEncodedKey
public byte[] getEncodedKey() -
setExpiryDate
public void setExpiryDate(long expiryDate) -
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- 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.
- Specified by:
readFieldsin interfaceWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
hashCode
public int hashCode() -
equals
-