|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer
@InterfaceAudience.Private @InterfaceStability.Unstable public class DelegationTokenRenewer
Service to renew application delegation tokens.
| Nested Class Summary | |
|---|---|
protected static class |
DelegationTokenRenewer.DelegationTokenToRenew
class that is used for keeping tracks of DT to renew |
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
|---|
org.apache.hadoop.service.Service.STATE |
| Field Summary | |
|---|---|
static long |
DEFAULT_RM_SYSTEM_CREDENTIALS_VALID_TIME_REMAINING
|
static String |
RM_SYSTEM_CREDENTIALS_VALID_TIME_REMAINING
|
static String |
SCHEME
|
| Constructor Summary | |
|---|---|
DelegationTokenRenewer()
|
|
| Method Summary | |
|---|---|
void |
addApplicationAsync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd,
String user)
Asynchronously add application tokens for renewal. |
void |
addApplicationSync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd,
String user)
Synchronously renew delegation tokens. |
void |
applicationFinished(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Removing delegation token for completed applications. |
protected ThreadPoolExecutor |
createNewThreadPoolService(org.apache.hadoop.conf.Configuration conf)
|
Set<org.apache.hadoop.security.token.Token<?>> |
getDelegationTokens()
|
protected org.apache.hadoop.security.token.Token<?>[] |
obtainSystemTokensForUser(String user,
org.apache.hadoop.security.Credentials credentials)
|
protected void |
renewToken(DelegationTokenRenewer.DelegationTokenToRenew dttr)
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf)
|
protected void |
serviceStart()
|
protected void |
serviceStop()
|
void |
setRMContext(RMContext rmContext)
|
protected void |
setTimerForTokenRenewal(DelegationTokenRenewer.DelegationTokenToRenew token)
set task to renew the token |
void |
updateKeepAliveApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> appIds)
Add a list of applications to the keep alive list. |
| Methods inherited from class org.apache.hadoop.service.AbstractService |
|---|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String SCHEME
public static final String RM_SYSTEM_CREDENTIALS_VALID_TIME_REMAINING
public static final long DEFAULT_RM_SYSTEM_CREDENTIALS_VALID_TIME_REMAINING
| Constructor Detail |
|---|
public DelegationTokenRenewer()
| Method Detail |
|---|
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected ThreadPoolExecutor createNewThreadPoolService(org.apache.hadoop.conf.Configuration conf)
protected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
serviceStop in class org.apache.hadoop.service.AbstractServicepublic Set<org.apache.hadoop.security.token.Token<?>> getDelegationTokens()
public void addApplicationAsync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd,
String user)
applicationId - added applicationts - tokensshouldCancelAtEnd - true if tokens should be canceled when the app is
done else false.user - user
IOException
public void addApplicationSync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd,
String user)
throws IOException,
InterruptedException
user - user
IOException
InterruptedException
protected void setTimerForTokenRenewal(DelegationTokenRenewer.DelegationTokenToRenew token)
throws IOException
IOException
protected void renewToken(DelegationTokenRenewer.DelegationTokenToRenew dttr)
throws IOException
IOException
protected org.apache.hadoop.security.token.Token<?>[] obtainSystemTokensForUser(String user,
org.apache.hadoop.security.Credentials credentials)
throws IOException,
InterruptedException
IOException
InterruptedExceptionpublic void applicationFinished(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId - completed applicationpublic void updateKeepAliveApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> appIds)
appIds - the list of applicationIds to be kept alive.public void setRMContext(RMContext rmContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||