Package org.apache.storm.common
Class AbstractHadoopNimbusPluginAutoCreds
java.lang.Object
org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
- All Implemented Interfaces:
- CredentialKeyProvider,- Shutdownable,- ICredentialsRenewer,- INimbusCredentialPlugin
- Direct Known Subclasses:
- AutoHBaseNimbus,- AutoHDFSNimbus
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.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract voidPrepare the plugin.protected abstract voiddoRenew(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) protected voidfillHadoopConfiguration(Map topologyConf, String configKey, org.apache.hadoop.conf.Configuration configuration) getConfigKeys(Map<String, Object> conf) protected abstract StringThe lookup key for the config key string.protected abstract byte[]getHadoopCredentials(Map<String, Object> topologyConf, String topologyOwnerPrincipal) protected abstract byte[]getHadoopCredentials(Map<String, Object> topologyConf, String configKey, String topologyOwnerPrincipal) voidpopulateCredentials(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) Method that will be called on nimbus as part of submit topology.voidThis method will be called when nimbus initializes.voidrenew(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) Renew any credentials that need to be renewed.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.common.CredentialKeyProvidergetCredentialKeyMethods inherited from interface org.apache.storm.security.INimbusCredentialPluginpopulateCredentialsMethods inherited from interface org.apache.storm.daemon.Shutdownableshutdown
- 
Field Details- 
CONFIG_KEY_RESOURCES- See Also:
 
 
- 
- 
Constructor Details- 
AbstractHadoopNimbusPluginAutoCredspublic AbstractHadoopNimbusPluginAutoCreds()
 
- 
- 
Method Details- 
prepareDescription copied from interface:INimbusCredentialPluginThis method will be called when nimbus initializes.- Specified by:
- preparein interface- ICredentialsRenewer
- Specified by:
- preparein interface- INimbusCredentialPlugin
- Parameters:
- conf- the cluster config
 
- 
populateCredentialspublic void populateCredentials(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) Description copied from interface: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.- Specified by:
- populateCredentialsin interface- INimbusCredentialPlugin
- Parameters:
- credentials- credentials map where more credentials will be added.
- topologyConf- topology configuration
- topologyOwnerPrincipal- the full principal name of the owner of the topology
 
- 
renewpublic void renew(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) Description copied from interface:ICredentialsRenewerRenew any credentials that need to be renewed. (Update the credentials if needed)- Specified by:
- renewin interface- ICredentialsRenewer
- Parameters:
- credentials- the credentials that may have something to renew.
- topologyConf- topology configuration.
- topologyOwnerPrincipal- the full principal name of the owner of the topology
 
- 
getCredentials
- 
fillHadoopConfiguration
- 
doPreparePrepare the plugin.- Parameters:
- conf- the storm cluster conf set via storm.yaml
 
- 
getConfigKeyStringThe lookup key for the config key string.- Returns:
- the config key string
 
- 
getHadoopCredentials
- 
getHadoopCredentials
- 
doRenew
- 
getConfigKeys
 
-