public class AutoHBase extends Object implements IAutoCredentials, ICredentialsRenewer, INimbusCredentialPlugin
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 |
| Constructor and Description |
|---|
AutoHBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTokensToUGI(Subject subject) |
protected String |
getCredentialKey() |
protected Object |
getCredentials(Map<String,String> credentials) |
protected byte[] |
getHadoopCredentials(Map<String,Object> conf,
String topologyOwnerPrincipal) |
static void |
main(String[] args) |
void |
populateCredentials(Map<String,String> credentials) |
void |
populateCredentials(Map<String,String> credentials,
Map topoConf) |
void |
populateCredentials(Map<String,String> credentials,
Map<String,Object> conf,
String owner) |
void |
populateSubject(Subject subject,
Map<String,String> credentials) |
void |
prepare(Map conf) |
void |
renew(Map<String,String> credentials,
Map topologyConf) |
void |
renew(Map<String,String> credentials,
Map<String,Object> topologyConf,
String ownerPrincipal) |
void |
shutdown() |
void |
updateSubject(Subject subject,
Map<String,String> credentials) |
public 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 prepare(Map conf)
prepare in interface IAutoCredentialsprepare in interface ICredentialsRenewerprepare in interface INimbusCredentialPluginpublic void shutdown()
shutdown in interface Shutdownablepublic void populateCredentials(Map<String,String> credentials, Map<String,Object> conf, String owner)
populateCredentials in interface INimbusCredentialPluginpublic void populateCredentials(Map<String,String> credentials)
populateCredentials in interface IAutoCredentialspublic void updateSubject(Subject subject, Map<String,String> credentials)
updateSubject in interface IAutoCredentialspublic void populateSubject(Subject subject, Map<String,String> credentials)
populateSubject in interface IAutoCredentialspublic void addTokensToUGI(Subject subject)
protected byte[] getHadoopCredentials(Map<String,Object> conf, String topologyOwnerPrincipal)
public void renew(Map<String,String> credentials, Map<String,Object> topologyConf, String ownerPrincipal)
renew in interface ICredentialsRenewerprotected String getCredentialKey()
public void populateCredentials(Map<String,String> credentials, Map topoConf)
populateCredentials in interface INimbusCredentialPluginCopyright © 2018 The Apache Software Foundation. All Rights Reserved.