java.lang.Object
org.apache.hadoop.ozone.container.common.helpers.TokenHelper

public class TokenHelper extends Object
Wraps block and container token managers for datanode.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TokenHelper(org.apache.hadoop.hdds.security.SecurityConfig securityConfig, org.apache.hadoop.hdds.security.symmetric.SecretKeySignerClient secretKeyClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    encode(org.apache.hadoop.security.token.Token<?> token)
     
    org.apache.hadoop.security.token.Token<org.apache.hadoop.hdds.security.token.OzoneBlockTokenIdentifier>
    getBlockToken(org.apache.hadoop.hdds.client.BlockID blockID, long length)
     
    org.apache.hadoop.security.token.Token<org.apache.hadoop.hdds.security.token.ContainerTokenIdentifier>
    getContainerToken(org.apache.hadoop.hdds.scm.container.ContainerID containerID)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TokenHelper

      public TokenHelper(org.apache.hadoop.hdds.security.SecurityConfig securityConfig, org.apache.hadoop.hdds.security.symmetric.SecretKeySignerClient secretKeyClient) throws IOException
      Throws:
      IOException
  • Method Details

    • getBlockToken

      public org.apache.hadoop.security.token.Token<org.apache.hadoop.hdds.security.token.OzoneBlockTokenIdentifier> getBlockToken(org.apache.hadoop.hdds.client.BlockID blockID, long length)
    • getContainerToken

      public org.apache.hadoop.security.token.Token<org.apache.hadoop.hdds.security.token.ContainerTokenIdentifier> getContainerToken(org.apache.hadoop.hdds.scm.container.ContainerID containerID)
    • encode

      public static String encode(org.apache.hadoop.security.token.Token<?> token) throws IOException
      Throws:
      IOException