public class TokenCache extends Object
限定符和类型 | 字段和说明 |
---|---|
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
|
构造器和说明 |
---|
TokenCache() |
限定符和类型 | 方法和说明 |
---|---|
static void |
cleanUpTokenReferral(Configuration conf)
Remove jobtoken referrals which don't make sense in the context
of the task execution.
|
static Token<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
|
public static final String JOB_TOKEN_HDFS_FILE
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
- configurationIOException
public static void cleanUpTokenReferral(Configuration conf)
conf
- configuration object.public static Token<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)
Copyright © 2009 The Apache Software Foundation