|
||||||||||
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
@InterfaceAudience.Public @InterfaceStability.Evolving public class TokenUtil
Utility methods for obtaining authentication tokens.
Constructor Summary | |
---|---|
TokenUtil()
|
Method Summary | |
---|---|
static void |
addTokenForJob(HConnection conn,
org.apache.hadoop.mapred.JobConf job,
User user)
Checks for an authentication token for the given user, obtaining a new token if necessary, and adds it to the credentials for the given map reduce job. |
static void |
addTokenForJob(HConnection conn,
User user,
org.apache.hadoop.mapreduce.Job job)
Checks for an authentication token for the given user, obtaining a new token if necessary, and adds it to the credentials for the given map reduce job. |
static boolean |
addTokenIfMissing(HConnection conn,
User user)
Checks if an authentication tokens exists for the connected cluster, obtaining one if needed and adding it to the user's credentials. |
static void |
obtainAndCacheToken(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.security.UserGroupInformation user)
Deprecated. Replaced by obtainAndCacheToken(HConnection,User) |
static void |
obtainAndCacheToken(HConnection conn,
User 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)
Deprecated. Replaced by obtainToken(HConnection) |
static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> |
obtainToken(HConnection conn)
Obtain and return an authentication token for the current user. |
static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> |
obtainToken(HConnection conn,
User user)
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)
Deprecated. Replaced by obtainTokenForJob(HConnection,User,Job) |
static void |
obtainTokenForJob(HConnection conn,
org.apache.hadoop.mapred.JobConf job,
User user)
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(HConnection conn,
User 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)
Deprecated. Replaced by obtainTokenForJob(HConnection,JobConf,User) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TokenUtil()
Method Detail |
---|
@Deprecated public static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> obtainToken(org.apache.hadoop.conf.Configuration conf) throws IOException
obtainToken(HConnection)
conf
- the configuration for connecting to the cluster
IOException
public static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> obtainToken(HConnection conn) throws IOException
conn
- The HBase cluster connection
IOException
public static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> obtainToken(HConnection conn, User user) throws IOException, InterruptedException
conn
- The HBase cluster connection
IOException
InterruptedException
@Deprecated public static void obtainAndCacheToken(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.UserGroupInformation user) throws IOException, InterruptedException
obtainAndCacheToken(HConnection,User)
conf
- The configuration for connecting to the clusteruser
- The user for whom to obtain the token
IOException
- If making a remote call to the authentication service fails
InterruptedException
- If executing as the given user is interruptedpublic static void obtainAndCacheToken(HConnection conn, User user) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- The user for whom to obtain the token
IOException
- If making a remote call to the authentication service fails
InterruptedException
- If executing as the given user is interrupted@Deprecated public static void obtainTokenForJob(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.UserGroupInformation user, org.apache.hadoop.mapreduce.Job job) throws IOException, InterruptedException
obtainTokenForJob(HConnection,User,Job)
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 authentication service fails
InterruptedException
- If executing as the given user is interruptedpublic static void obtainTokenForJob(HConnection conn, User user, org.apache.hadoop.mapreduce.Job job) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- 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 authentication service fails
InterruptedException
- If executing as the given user is interrupted@Deprecated public static void obtainTokenForJob(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.security.UserGroupInformation user) throws IOException, InterruptedException
obtainTokenForJob(HConnection,JobConf,User)
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 authentication service fails
InterruptedException
- If executing as the given user is interruptedpublic static void obtainTokenForJob(HConnection conn, org.apache.hadoop.mapred.JobConf job, User user) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- 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 authentication service fails
InterruptedException
- If executing as the given user is interruptedpublic static void addTokenForJob(HConnection conn, org.apache.hadoop.mapred.JobConf job, User user) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- 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 authentication service fails
InterruptedException
- If executing as the given user is interruptedpublic static void addTokenForJob(HConnection conn, User user, org.apache.hadoop.mapreduce.Job job) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- 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 authentication service fails
InterruptedException
- If executing as the given user is interruptedpublic static boolean addTokenIfMissing(HConnection conn, User user) throws IOException, InterruptedException
conn
- The HBase cluster connectionuser
- The user for whom to obtain the token
IOException
- If making a remote call to the authentication service 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 |