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 conf) |
static void |
main(String[] args) |
void |
populateCredentials(Map<String,String> credentials) |
void |
populateCredentials(Map<String,String> credentials,
Map conf) |
void |
populateSubject(Subject subject,
Map<String,String> credentials) |
void |
prepare(Map conf) |
void |
renew(Map<String,String> credentials,
Map topologyConf) |
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 conf)
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 conf)
public void renew(Map<String,String> credentials, Map topologyConf)
renew in interface ICredentialsRenewerprotected String getCredentialKey()
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.