public class AutoHDFS extends Object implements IAutoCredentials, ICredentialsRenewer, INimbusCredentialPlugin
Automatically get HDFS delegation tokens and push it to user’s topology. The class assumes that HDFS configuration files are in your class path.
| Modifier and Type | Field and Description |
|---|---|
static String |
HDFS_CREDENTIALS |
static String |
TOPOLOGY_HDFS_URI |
| Constructor and Description |
|---|
AutoHDFS() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTokensToUGI(Subject subject) |
protected String |
getCredentialKey() |
protected org.apache.hadoop.security.Credentials |
getCredentials(Map<String,String> credentials) |
protected byte[] |
getHadoopCredentials(Map 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> topoConf,
String topologyOwnerPrincipal) |
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 topologyOwnerPrincipal) |
void |
shutdown() |
void |
updateSubject(Subject subject,
Map<String,String> credentials) |
public static final String HDFS_CREDENTIALS
public static final String TOPOLOGY_HDFS_URI
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> topoConf, String topologyOwnerPrincipal)
populateCredentials in interface INimbusCredentialPluginpublic void populateCredentials(Map<String,String> credentials)
populateCredentials in interface IAutoCredentialsprotected org.apache.hadoop.security.Credentials getCredentials(Map<String,String> credentials)
credentials - map with creds.public 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)
public void renew(Map<String,String> credentials, Map<String,Object> topologyConf, String topologyOwnerPrincipal)
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.