|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.security.token.TokenUtil
public class TokenUtil
Utility methods for obtaining authentication tokens.
Constructor Summary | |
---|---|
TokenUtil()
|
Method Summary | |
---|---|
static void |
obtainAndCacheToken(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.security.UserGroupInformation user)
Obtain an authentication token for the given user and add it to the user's credentials. |
static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> |
obtainToken(org.apache.hadoop.conf.Configuration conf)
Obtain and return an authentication token for the current user. |
static void |
obtainTokenForJob(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.security.UserGroupInformation user,
org.apache.hadoop.mapreduce.Job job)
Obtain an authentication token on behalf of the given user and add it to the credentials for the given map reduce job. |
static void |
obtainTokenForJob(org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.security.UserGroupInformation user)
Obtain an authentication token on behalf of the given user and add it to the credentials for the given map reduce job. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TokenUtil()
Method Detail |
---|
public static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> obtainToken(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- The configuration for connecting to the cluster
IOException
public static void obtainAndCacheToken(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.UserGroupInformation user) throws IOException, InterruptedException
conf
- The configuration for connecting to the clusteruser
- The user for whom to obtain the token
IOException
- If making a remote call to the TokenProvider
fails
InterruptedException
- If executing as the given user is interruptedpublic static void obtainTokenForJob(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.UserGroupInformation user, org.apache.hadoop.mapreduce.Job job) throws IOException, InterruptedException
conf
- The configuration for connecting to the clusteruser
- The user for whom to obtain the tokenjob
- The job instance in which the token should be stored
IOException
- If making a remote call to the TokenProvider
fails
InterruptedException
- If executing as the given user is interruptedpublic static void obtainTokenForJob(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.security.UserGroupInformation user) throws IOException, InterruptedException
user
- The user for whom to obtain the tokenjob
- The job configuration in which the token should be stored
IOException
- If making a remote call to the TokenProvider
fails
InterruptedException
- If executing as the given user is interrupted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |