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 Details

    • DelegationKey

      public DelegationKey()
      Default constructore required for Writable
    • DelegationKey

      public DelegationKey(int keyId, long expiryDate, SecretKey key)
    • DelegationKey

      public DelegationKey(int keyId, long expiryDate, byte[] encodedKey)
  • Method Details

    • getKeyId

      public int getKeyId()
    • getExpiryDate

      public long getExpiryDate()
    • getKey

      public SecretKey getKey()
    • getEncodedKey

      public byte[] getEncodedKey()
    • setExpiryDate

      public void setExpiryDate(long expiryDate)
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Specified by:
      write in interface Writable
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException - any other problem for write.
    • readFields

      public void readFields(DataInput in) throws IOException
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Specified by:
      readFields in interface Writable
      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException - any other problem for readFields.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object right)
      Overrides:
      equals in class Object