|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.security.TokenCache
public class TokenCache
This class provides user facing APIs for transferring secrets from the job client to the tasks. The secrets can be stored just before submission of jobs and read during the task execution.
Field Summary | |
---|---|
static java.lang.String |
JOB_TOKEN_HDFS_FILE
file name used on HDFS for generated job token |
static java.lang.String |
JOB_TOKENS_FILENAME
conf setting for job tokens cache file name |
Constructor Summary | |
---|---|
TokenCache()
|
Method Summary | |
---|---|
static void |
cleanUpTokenReferral(org.apache.hadoop.conf.Configuration conf)
Remove jobtoken referrals which don't make sense in the context of the task execution. |
static org.apache.hadoop.security.token.Token<JobTokenIdentifier> |
getJobToken(org.apache.hadoop.security.Credentials credentials)
|
static byte[] |
getSecretKey(org.apache.hadoop.security.Credentials credentials,
org.apache.hadoop.io.Text alias)
auxiliary method to get user's secret keys.. |
static org.apache.hadoop.security.Credentials |
loadTokens(java.lang.String jobTokenFile,
org.apache.hadoop.conf.Configuration conf)
load job token from a file |
static void |
obtainTokensForNamenodes(org.apache.hadoop.security.Credentials credentials,
org.apache.hadoop.fs.Path[] ps,
org.apache.hadoop.conf.Configuration conf)
Convenience method to obtain delegation tokens from namenodes corresponding to the paths passed. |
static void |
setJobToken(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> t,
org.apache.hadoop.security.Credentials credentials)
store job token |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JOB_TOKEN_HDFS_FILE
public static final java.lang.String JOB_TOKENS_FILENAME
Constructor Detail |
---|
public TokenCache()
Method Detail |
---|
public static byte[] getSecretKey(org.apache.hadoop.security.Credentials credentials, org.apache.hadoop.io.Text alias)
alias
-
public static void obtainTokensForNamenodes(org.apache.hadoop.security.Credentials credentials, org.apache.hadoop.fs.Path[] ps, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
ps
- array of pathsconf
- configuration
java.io.IOException
public static void cleanUpTokenReferral(org.apache.hadoop.conf.Configuration conf)
conf
- configuration object.public static org.apache.hadoop.security.Credentials loadTokens(java.lang.String jobTokenFile, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
conf
-
java.io.IOException
public static void setJobToken(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> t, org.apache.hadoop.security.Credentials credentials)
t
- public static org.apache.hadoop.security.token.Token<JobTokenIdentifier> getJobToken(org.apache.hadoop.security.Credentials credentials)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |