public class AutoHBase extends AbstractAutoCreds
Automatically get hbase delegation tokens and push it to user’s topology. The class assumes that hadoop/hbase configuration files are in your class path.
| Modifier and Type | Field and Description |
|---|---|
static String |
HBASE_CREDENTIALS |
static String |
HBASE_KEYTAB_FILE_KEY |
static String |
HBASE_PRINCIPAL_KEY |
String |
hbaseKeytab |
String |
hbasePrincipal |
CONFIG_KEY_RESOURCES| Constructor and Description |
|---|
AutoHBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
doPrepare(Map conf)
Prepare the plugin
|
void |
doRenew(Map<String,String> credentials,
Map<String,Object> topologyConf,
String ownerPrincipal) |
protected String |
getConfigKeyString()
The lookup key for the config key string
|
protected String |
getCredentialKey(String configKey)
The key with which the credentials are stored in the credentials map
|
protected byte[] |
getHadoopCredentials(Map<String,Object> conf,
org.apache.hadoop.conf.Configuration hbaseConf,
String topologyOwnerPrincipal) |
protected byte[] |
getHadoopCredentials(Map<String,Object> conf,
String topologyOwnerPrincipal) |
protected byte[] |
getHadoopCredentials(Map<String,Object> conf,
String configKey,
String topologyOwnerPrincipal) |
static void |
main(String[] args) |
void |
populateCredentials(Map<String,String> credentials,
Map topoConf) |
void |
renew(Map<String,String> credentials,
Map topologyConf) |
void |
shutdown() |
fillHadoopConfiguration, getCredentials, populateCredentials, populateCredentials, populateSubject, prepare, renew, updateSubjectpublic static final String HBASE_CREDENTIALS
public static final String HBASE_KEYTAB_FILE_KEY
public static final String HBASE_PRINCIPAL_KEY
public String hbaseKeytab
public String hbasePrincipal
public void doPrepare(Map conf)
AbstractAutoCredsPrepare the plugin
doPrepare in class AbstractAutoCredsconf - the storm cluster conf set via storm.yamlprotected String getConfigKeyString()
AbstractAutoCredsThe lookup key for the config key string
getConfigKeyString in class AbstractAutoCredspublic void shutdown()
protected byte[] getHadoopCredentials(Map<String,Object> conf, String configKey, String topologyOwnerPrincipal)
getHadoopCredentials in class AbstractAutoCredsprotected byte[] getHadoopCredentials(Map<String,Object> conf, String topologyOwnerPrincipal)
getHadoopCredentials in class AbstractAutoCredsprotected byte[] getHadoopCredentials(Map<String,Object> conf, org.apache.hadoop.conf.Configuration hbaseConf, String topologyOwnerPrincipal)
public void doRenew(Map<String,String> credentials, Map<String,Object> topologyConf, String ownerPrincipal)
doRenew in class AbstractAutoCredsprotected String getCredentialKey(String configKey)
AbstractAutoCredsThe key with which the credentials are stored in the credentials map
getCredentialKey in class AbstractAutoCredsCopyright © 2018 The Apache Software Foundation. All Rights Reserved.