org.apache.hadoop.mapreduce.security
Class TokenCache
java.lang.Object
org.apache.hadoop.mapreduce.security.TokenCache
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class TokenCache
- extends Object
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.
Method Summary |
static byte[] |
getSecretKey(org.apache.hadoop.security.Credentials credentials,
org.apache.hadoop.io.Text alias)
auxiliary method to get user's secret keys.. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenCache
public TokenCache()
getSecretKey
public static byte[] getSecretKey(org.apache.hadoop.security.Credentials credentials,
org.apache.hadoop.io.Text alias)
- auxiliary method to get user's secret keys..
- Parameters:
alias
-
- Returns:
- secret key from the storage
obtainTokensForNamenodes
public static void obtainTokensForNamenodes(org.apache.hadoop.security.Credentials credentials,
org.apache.hadoop.fs.Path[] ps,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Convenience method to obtain delegation tokens from namenodes
corresponding to the paths passed.
- Parameters:
credentials
- ps
- array of pathsconf
- configuration
- Throws:
IOException
Copyright © 2009 The Apache Software Foundation