Class HdfsDtFetcher

java.lang.Object
org.apache.hadoop.hdfs.HdfsDtFetcher
All Implemented Interfaces:
org.apache.hadoop.security.token.DtFetcher
Direct Known Subclasses:
SWebHdfsDtFetcher, WebHdfsDtFetcher

public class HdfsDtFetcher extends Object implements org.apache.hadoop.security.token.DtFetcher
DtFetcher is an interface which permits the abstraction and separation of delegation token fetch implementaions across different packages and compilation units. Resolution of fetcher impl will be done at runtime.
  • Constructor Details

    • HdfsDtFetcher

      public HdfsDtFetcher()
  • Method Details

    • getServiceName

      public org.apache.hadoop.io.Text getServiceName()
      Returns the service name for HDFS, which is also a valid URL prefix.
      Specified by:
      getServiceName in interface org.apache.hadoop.security.token.DtFetcher
    • isTokenRequired

      public boolean isTokenRequired()
      Specified by:
      isTokenRequired in interface org.apache.hadoop.security.token.DtFetcher
    • addDelegationTokens

      public org.apache.hadoop.security.token.Token<?> addDelegationTokens(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.Credentials creds, String renewer, String url) throws Exception
      Returns Token object via FileSystem, null if bad argument.
      Specified by:
      addDelegationTokens in interface org.apache.hadoop.security.token.DtFetcher
      Parameters:
      conf - - a Configuration object used with FileSystem.get()
      creds - - a Credentials object to which token(s) will be added
      renewer - - the renewer to send with the token request
      url - - the URL to which the request is sent
      Returns:
      a Token, or null if fetch fails.
      Throws:
      Exception