public class TokenUtils extends Object
This class is compatible with Hadoop 2.
| Constructor and Description |
|---|
TokenUtils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
getHadoopTokens(State state)
Get Hadoop tokens (tokens for job history server, job tracker and HDFS) using Kerberos keytab.
|
public static File getHadoopTokens(State state) throws IOException, InterruptedException
state - A State object that should contain property USER_TO_PROXY,
KEYTAB_USER and KEYTAB_LOCATION. To obtain tokens for
other namenodes, use property OTHER_NAMENODES with comma separated HDFS URIs.File containing the negotiated credentials.IOExceptionInterruptedException