@InterfaceAudience.Public @InterfaceStability.Evolving public class TokenCache extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
TokenCache() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanUpTokenReferral(Configuration conf)
Remove jobtoken referrals which don't make sense in the context
of the task execution.
|
static Token<?> |
getDelegationToken(Credentials credentials,
String namenode)
Deprecated.
Use
Credentials.getToken(org.apache.hadoop.io.Text)
instead, this method is included for compatibility against Hadoop-1 |
static Token<JobTokenIdentifier> |
getJobToken(Credentials credentials) |
static byte[] |
getSecretKey(Credentials credentials,
Text alias)
auxiliary method to get user's secret keys..
|
static byte[] |
getShuffleSecretKey(Credentials credentials) |
static Credentials |
loadTokens(String jobTokenFile,
Configuration conf)
Deprecated.
Use
Credentials.readTokenStorageFile(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration) instead,
this method is included for compatibility against Hadoop-1. |
static Credentials |
loadTokens(String jobTokenFile,
JobConf conf)
Deprecated.
Use
Credentials.readTokenStorageFile(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration) instead,
this method is included for compatibility against Hadoop-1. |
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
|
static void |
setShuffleSecretKey(byte[] key,
Credentials credentials) |
@InterfaceAudience.Private public static final String JOB_TOKEN_HDFS_FILE
@InterfaceAudience.Private public static final String JOB_TOKENS_FILENAME
public static byte[] getSecretKey(Credentials credentials, Text alias)
alias
- public static void obtainTokensForNamenodes(Credentials credentials, Path[] ps, Configuration conf) throws IOException
credentials
- ps
- array of pathsconf
- configurationIOException
public static void cleanUpTokenReferral(Configuration conf)
conf
- @InterfaceAudience.Private @Deprecated public static Credentials loadTokens(String jobTokenFile, JobConf conf) throws IOException
Credentials.readTokenStorageFile(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration)
instead,
this method is included for compatibility against Hadoop-1.conf
- IOException
@InterfaceAudience.Private @Deprecated public static Credentials loadTokens(String jobTokenFile, Configuration conf) throws IOException
Credentials.readTokenStorageFile(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration)
instead,
this method is included for compatibility against Hadoop-1.conf
- IOException
@InterfaceAudience.Private public static void setJobToken(Token<? extends TokenIdentifier> t, Credentials credentials)
t
- @InterfaceAudience.Private public static Token<JobTokenIdentifier> getJobToken(Credentials credentials)
@InterfaceAudience.Private public static void setShuffleSecretKey(byte[] key, Credentials credentials)
@InterfaceAudience.Private public static byte[] getShuffleSecretKey(Credentials credentials)
@InterfaceAudience.Private @Deprecated public static Token<?> getDelegationToken(Credentials credentials, String namenode)
Credentials.getToken(org.apache.hadoop.io.Text)
instead, this method is included for compatibility against Hadoop-1namenode
- Copyright © 2013 Apache Software Foundation. All rights reserved.