|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 String |
JOB_TOKEN_HDFS_FILE
file name used on HDFS for generated job token |
static String |
JOB_TOKENS_FILENAME
conf setting for job tokens cache file name |
Constructor Summary | |
---|---|
TokenCache()
|
Method Summary | |
---|---|
static Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> |
getDelegationToken(Credentials credentials,
String namenode)
|
static Token<JobTokenIdentifier> |
getJobToken(Credentials credentials)
|
static byte[] |
getSecretKey(Credentials credentials,
Text alias)
auxiliary method to get user's secret keys.. |
static Credentials |
loadTokens(String jobTokenFile,
Configuration conf)
load job token from a file |
static void |
obtainTokensForNamenodes(Credentials credentials,
Path[] ps,
Configuration conf)
Convenience method to obtain delegation tokens from namenodes corresponding to the paths passed. |
static void |
setJobToken(Token<? extends TokenIdentifier> t,
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 String JOB_TOKEN_HDFS_FILE
public static final String JOB_TOKENS_FILENAME
Constructor Detail |
---|
public TokenCache()
Method Detail |
---|
public static byte[] getSecretKey(Credentials credentials, Text alias)
alias
-
public static void obtainTokensForNamenodes(Credentials credentials, Path[] ps, Configuration conf) throws IOException
ps
- array of pathsconf
- configuration
IOException
public static Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> getDelegationToken(Credentials credentials, String namenode)
namenode
-
public static Credentials loadTokens(String jobTokenFile, Configuration conf) throws IOException
conf
-
IOException
public static void setJobToken(Token<? extends TokenIdentifier> t, Credentials credentials)
t
- public static Token<JobTokenIdentifier> getJobToken(Credentials credentials)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |