Package org.apache.storm.hdfs.security
Class AutoHDFSNimbus
- java.lang.Object
-
- org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
-
- org.apache.storm.hdfs.security.AutoHDFSNimbus
-
- All Implemented Interfaces:
CredentialKeyProvider
,Shutdownable
,ICredentialsRenewer
,INimbusCredentialPlugin
public class AutoHDFSNimbus extends AbstractHadoopNimbusPluginAutoCreds
Auto credentials nimbus plugin for HDFS implementation. This class automatically gets HDFS delegation tokens and push it to user's topology.
-
-
Field Summary
-
Fields inherited from class org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
CONFIG_KEY_RESOURCES
-
-
Constructor Summary
Constructors Constructor Description AutoHDFSNimbus()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doPrepare(Map<String,Object> conf)
Prepare the plugin.void
doRenew(Map<String,String> credentials, Map<String,Object> topologyConf, String topologyOwnerPrincipal)
protected String
getConfigKeyString()
The lookup key for the config key string.String
getCredentialKey(String configKey)
The lookup key for the config key string.protected byte[]
getHadoopCredentials(Map<String,Object> conf, String topologyOwnerPrincipal)
protected byte[]
getHadoopCredentials(Map<String,Object> conf, String configKey, String topologyOwnerPrincipal)
void
shutdown()
-
Methods inherited from class org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
fillHadoopConfiguration, getConfigKeys, getCredentials, populateCredentials, prepare, renew
-
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.security.INimbusCredentialPlugin
populateCredentials
-
-
-
-
Method Detail
-
doPrepare
public void doPrepare(Map<String,Object> conf)
Description copied from class:AbstractHadoopNimbusPluginAutoCreds
Prepare the plugin.- Specified by:
doPrepare
in classAbstractHadoopNimbusPluginAutoCreds
- Parameters:
conf
- the storm cluster conf set via storm.yaml
-
getConfigKeyString
protected String getConfigKeyString()
Description copied from class:AbstractHadoopNimbusPluginAutoCreds
The lookup key for the config key string.- Specified by:
getConfigKeyString
in classAbstractHadoopNimbusPluginAutoCreds
- Returns:
- the config key string
-
shutdown
public void shutdown()
-
getHadoopCredentials
protected byte[] getHadoopCredentials(Map<String,Object> conf, String configKey, String topologyOwnerPrincipal)
- Specified by:
getHadoopCredentials
in classAbstractHadoopNimbusPluginAutoCreds
-
getHadoopCredentials
protected byte[] getHadoopCredentials(Map<String,Object> conf, String topologyOwnerPrincipal)
- Specified by:
getHadoopCredentials
in classAbstractHadoopNimbusPluginAutoCreds
-
doRenew
public void doRenew(Map<String,String> credentials, Map<String,Object> topologyConf, String topologyOwnerPrincipal)
- Specified by:
doRenew
in classAbstractHadoopNimbusPluginAutoCreds
-
getCredentialKey
public String getCredentialKey(String configKey)
Description copied from interface:CredentialKeyProvider
The lookup key for the config key string.- Returns:
- the config key string
-
-