public abstract class AbstractHadoopAutoCreds extends Object implements IAutoCredentials, CredentialKeyProvider
The base class that for auto credential plugins that abstracts out some of the common functionality.
Constructor and Description |
---|
AbstractHadoopAutoCreds() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doPrepare(Map<String,Object> topoConf)
Prepare the plugin
|
protected abstract String |
getConfigKeyString()
The lookup key for the config key string
|
Set<org.apache.commons.math3.util.Pair<String,org.apache.hadoop.security.Credentials>> |
getCredentials(Map<String,String> credentials) |
void |
populateCredentials(Map<String,String> credentials)
Called to populate the credentials on the client side.
|
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<String,Object> topoConf) |
void |
updateSubject(Subject subject,
Map<String,String> credentials)
Called to update the subject on the worker side when new credentials are recieved.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCredentialKey
public void prepare(Map<String,Object> topoConf)
prepare
in interface IAutoCredentials
public void populateCredentials(Map<String,String> credentials)
IAutoCredentials
Called to populate the credentials on the client side.
populateCredentials
in interface IAutoCredentials
credentials
- the credentials to be populated.public void populateSubject(Subject subject, Map<String,String> credentials)
Called to initially populate the subject on the worker side with credentials passed in.
populateSubject
in interface IAutoCredentials
subject
- the subject to optionally put credentials in.credentials
- the credentials to be used.public void updateSubject(Subject subject, Map<String,String> credentials)
Called to update the subject on the worker side when new credentials are recieved. This means that populateSubject has already been called on this subject.
updateSubject
in interface IAutoCredentials
subject
- the subject to optionally put credentials in.credentials
- the credentials to be used.public Set<org.apache.commons.math3.util.Pair<String,org.apache.hadoop.security.Credentials>> getCredentials(Map<String,String> credentials)
protected abstract void doPrepare(Map<String,Object> topoConf)
Prepare the plugin
topoConf
- the topology confprotected abstract String getConfigKeyString()
The lookup key for the config key string
Copyright © 2019 The Apache Software Foundation. All rights reserved.