public class AutoHBase extends Object implements IAutoCredentials, ICredentialsRenewer, INimbusCredentialPlugin
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)
Called to populate the credentials on the client side.
|
void |
populateCredentials(Map<String,String> credentials,
Map conf)
Method that will be called on nimbus as part of submit topology.
|
void |
populateSubject(Subject subject,
Map<String,String> credentials)
Called to initially populate the subject on the worker side with credentials passed in.
|
void |
prepare(Map conf)
Called when initializing the service.
|
void |
renew(Map<String,String> credentials,
Map topologyConf)
Renew any credentials that need to be renewed.
|
void |
shutdown() |
void |
updateSubject(Subject subject,
Map<String,String> credentials)
Called to update the subject on the worker side when new credentials are recieved.
|
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)
ICredentialsRenewer
prepare
in interface IAutoCredentials
prepare
in interface ICredentialsRenewer
prepare
in interface INimbusCredentialPlugin
conf
- the storm cluster configuration.public void shutdown()
shutdown
in interface Shutdownable
public void populateCredentials(Map<String,String> credentials, Map conf)
INimbusCredentialPlugin
populateCredentials
in interface INimbusCredentialPlugin
credentials
- credentials map where more credentials will be added.conf
- topology configurationpublic void populateCredentials(Map<String,String> credentials)
IAutoCredentials
populateCredentials
in interface IAutoCredentials
credentials
- the credentials to be populated.public void updateSubject(Subject subject, Map<String,String> credentials)
updateSubject
in interface IAutoCredentials
subject
- the subject to optionally put credentials in.credentials
- the credentials to be used.public void populateSubject(Subject subject, Map<String,String> credentials)
populateSubject
in interface IAutoCredentials
subject
- the subject to optionally put credentials in.credentials
- the credentials to be used.public void addTokensToUGI(Subject subject)
protected byte[] getHadoopCredentials(Map conf)
public void renew(Map<String,String> credentials, Map topologyConf)
ICredentialsRenewer
renew
in interface ICredentialsRenewer
credentials
- the credentials that may have something to renew.topologyConf
- topology configuration.protected String getCredentialKey()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.