public abstract class AbstractHadoopNimbusPluginAutoCreds extends Object implements INimbusCredentialPlugin, ICredentialsRenewer, CredentialKeyProvider
The base class that for auto credential plugins that abstracts out some of the common functionality.
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_KEY_RESOURCES |
| Constructor and Description |
|---|
AbstractHadoopNimbusPluginAutoCreds() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doPrepare(Map<String,Object> conf)
Prepare the plugin.
|
protected abstract void |
doRenew(Map<String,String> credentials,
Map<String,Object> topologyConf,
String topologyOwnerPrincipal) |
protected void |
fillHadoopConfiguration(Map topologyConf,
String configKey,
org.apache.hadoop.conf.Configuration configuration) |
protected List<String> |
getConfigKeys(Map<String,Object> conf) |
protected abstract String |
getConfigKeyString()
The lookup key for the config key string.
|
protected Set<org.apache.commons.math3.util.Pair<String,org.apache.hadoop.security.Credentials>> |
getCredentials(Map<String,String> credentials,
List<String> configKeys) |
protected abstract byte[] |
getHadoopCredentials(Map<String,Object> topologyConf,
String topologyOwnerPrincipal) |
protected abstract byte[] |
getHadoopCredentials(Map<String,Object> topologyConf,
String configKey,
String topologyOwnerPrincipal) |
void |
populateCredentials(Map<String,String> credentials,
Map<String,Object> topologyConf,
String topologyOwnerPrincipal)
Method that will be called on nimbus as part of submit topology.
|
void |
prepare(Map<String,Object> conf)
This method will be called when nimbus initializes.
|
void |
renew(Map<String,String> credentials,
Map<String,Object> topologyConf,
String topologyOwnerPrincipal)
Renew any credentials that need to be renewed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpopulateCredentialsshutdowngetCredentialKeypublic static final String CONFIG_KEY_RESOURCES
public void prepare(Map<String,Object> conf)
INimbusCredentialPluginThis method will be called when nimbus initializes.
prepare in interface ICredentialsRenewerprepare in interface INimbusCredentialPluginconf - the cluster configpublic void populateCredentials(Map<String,String> credentials, Map<String,Object> topologyConf, String topologyOwnerPrincipal)
INimbusCredentialPluginMethod that will be called on nimbus as part of submit topology. This plugin will be called at least once during the submit Topology action. It will be not be called during activate instead the credentials return by this method will be merged with the other credentials in the topology and stored in zookeeper.
populateCredentials in interface INimbusCredentialPlugincredentials - credentials map where more credentials will be added.topologyConf - topology configurationtopologyOwnerPrincipal - the full principal name of the owner of the topologypublic void renew(Map<String,String> credentials, Map<String,Object> topologyConf, String topologyOwnerPrincipal)
ICredentialsRenewerRenew any credentials that need to be renewed. (Update the credentials if needed)
renew in interface ICredentialsRenewercredentials - the credentials that may have something to renew.topologyConf - topology configuration.topologyOwnerPrincipal - the full principal name of the owner of the topologyprotected Set<org.apache.commons.math3.util.Pair<String,org.apache.hadoop.security.Credentials>> getCredentials(Map<String,String> credentials, List<String> configKeys)
protected void fillHadoopConfiguration(Map topologyConf, String configKey, org.apache.hadoop.conf.Configuration configuration)
protected abstract void doPrepare(Map<String,Object> conf)
Prepare the plugin.
conf - the storm cluster conf set via storm.yamlprotected abstract String getConfigKeyString()
The lookup key for the config key string.
protected abstract byte[] getHadoopCredentials(Map<String,Object> topologyConf, String configKey, String topologyOwnerPrincipal)
protected abstract byte[] getHadoopCredentials(Map<String,Object> topologyConf, String topologyOwnerPrincipal)
protected abstract void doRenew(Map<String,String> credentials, Map<String,Object> topologyConf, String topologyOwnerPrincipal)
Copyright © 2021 The Apache Software Foundation. All rights reserved.