Package org.apache.storm.common

## Class AbstractHadoopAutoCreds

- java.lang.Object
- - org.apache.storm.common.AbstractHadoopAutoCreds

- All Implemented Interfaces:
    `CredentialKeyProvider`, `IAutoCredentials`
  Direct Known Subclasses:
    `AutoHBase`, `AutoHDFS`, `AutoHive`

      public abstract class AbstractHadoopAutoCreds
      extends Object
      implements IAutoCredentials, CredentialKeyProvider

  The base class that for auto credential plugins that abstracts out some of the common functionality.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractHadoopAutoCreds()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract void` | `doPrepare​(Map<String,​Object> topoConf)` | Prepare the plugin.
    `protected abstract String` | `getConfigKeyString()` | The lookup key for the config key string.
    `Set<org.apache.commons.math3.util.Pair<String,​org.apache.hadoop.security.Credentials>>` | `getCredentials​(Map<String,​String> credentials)` |
    `void` | `populateCredentials​(Map<String,​String> credentials)` | Called to populate the credentials on the client side.
    `void` | `populateSubject​(Subject subject, Map<String,​String> credentials)` | Called to initially populate the subject on the worker side with credentials passed in.
    `void` | `prepare​(Map<String,​Object> topoConf)` |
    `void` | `updateSubject​(Subject subject, Map<String,​String> credentials)` | Called to update the subject on the worker side when new credentials are recieved.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.storm.common.CredentialKeyProvider

      `getCredentialKey`

- - ### Constructor Detail

    - #### AbstractHadoopAutoCreds

          public AbstractHadoopAutoCreds()

  - ### Method Detail

    - #### prepare

          public void prepare​(Map<String,​Object> topoConf)

      Specified by:
        `prepare` in interface `IAutoCredentials`

    - #### populateCredentials

          public void populateCredentials​(Map<String,​String> credentials)

      Description copied from interface: `IAutoCredentials`
      Called to populate the credentials on the client side.
      Specified by:
        `populateCredentials` in interface `IAutoCredentials`
      Parameters:
        `credentials` - the credentials to be populated.

    - #### populateSubject

          public void populateSubject​(Subject subject,
                                      Map<String,​String> credentials)

      Called to initially populate the subject on the worker side with credentials passed in.
      Specified by:
        `populateSubject` in interface `IAutoCredentials`
      Parameters:
        `subject` - the subject to optionally put credentials in.
        `credentials` - the credentials to be used.

    - #### updateSubject

          public void updateSubject​(Subject subject,
                                    Map<String,​String> credentials)

      Called to update the subject on the worker side when new credentials are recieved. This means that populateSubject has already been called on this subject.
      Specified by:
        `updateSubject` in interface `IAutoCredentials`
      Parameters:
        `subject` - the subject to optionally put credentials in.
        `credentials` - the credentials to be used.

    - #### getCredentials

          public Set<org.apache.commons.math3.util.Pair<String,​org.apache.hadoop.security.Credentials>> getCredentials​(Map<String,​String> credentials)

    - #### doPrepare

          protected abstract void doPrepare​(Map<String,​Object> topoConf)

      Prepare the plugin.
      Parameters:
        `topoConf` - the topology conf

    - #### getConfigKeyString

          protected abstract String getConfigKeyString()

      The lookup key for the config key string.
      Returns:
        the config key string