Package org.apache.storm.hive.security
Class AutoHiveNimbus
java.lang.Object
org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
org.apache.storm.hive.security.AutoHiveNimbus
- All Implemented Interfaces:
CredentialKeyProvider,Shutdownable,ICredentialsRenewer,INimbusCredentialPlugin
Auto credentials nimbus plugin for Hive implementation. This class automatically
gets Hive delegation tokens and push it to user's topology.
-
Field Summary
FieldsFields inherited from class org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
CONFIG_KEY_RESOURCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hive.conf.HiveConfcreateHiveConf(String metaStoreUri, String hiveMetaStorePrincipal) voidPrepare the plugin.voiddoRenew(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) protected StringThe lookup key for the config key string.getCredentialKey(String configKey) The lookup key for the config key string.protected byte[]getHadoopCredentials(Map<String, Object> conf, String topologyOwnerPrincipal) protected byte[]protected byte[]getHadoopCredentials(Map<String, Object> conf, org.apache.hadoop.conf.Configuration configuration, String topologySubmitterUser) voidshutdown()Methods inherited from class org.apache.storm.common.AbstractHadoopNimbusPluginAutoCreds
fillHadoopConfiguration, getConfigKeys, getCredentials, populateCredentials, prepare, renewMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.security.INimbusCredentialPlugin
populateCredentials
-
Field Details
-
hiveKeytab
-
hivePrincipal
-
metaStoreURI
-
-
Constructor Details
-
AutoHiveNimbus
public AutoHiveNimbus()
-
-
Method Details
-
doPrepare
Description copied from class:AbstractHadoopNimbusPluginAutoCredsPrepare the plugin.- Specified by:
doPreparein classAbstractHadoopNimbusPluginAutoCreds- Parameters:
conf- the storm cluster conf set via storm.yaml
-
getConfigKeyString
Description copied from class:AbstractHadoopNimbusPluginAutoCredsThe lookup key for the config key string.- Specified by:
getConfigKeyStringin classAbstractHadoopNimbusPluginAutoCreds- Returns:
- the config key string
-
shutdown
public void shutdown() -
getHadoopCredentials
protected byte[] getHadoopCredentials(Map<String, Object> conf, String configKey, String topologyOwnerPrincipal) - Specified by:
getHadoopCredentialsin classAbstractHadoopNimbusPluginAutoCreds
-
getHadoopCredentials
- Specified by:
getHadoopCredentialsin classAbstractHadoopNimbusPluginAutoCreds
-
getHadoopCredentials
-
createHiveConf
public org.apache.hadoop.hive.conf.HiveConf createHiveConf(String metaStoreUri, String hiveMetaStorePrincipal) throws IOException - Throws:
IOException
-
doRenew
public void doRenew(Map<String, String> credentials, Map<String, Object> topologyConf, String topologyOwnerPrincipal) - Specified by:
doRenewin classAbstractHadoopNimbusPluginAutoCreds
-
getCredentialKey
Description copied from interface:CredentialKeyProviderThe lookup key for the config key string.- Returns:
- the config key string
-