@InterfaceAudience.Private
 @InterfaceStability.Unstable
public class DelegationTokenRenewer
extends org.apache.hadoop.service.AbstractService
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | DelegationTokenRenewer.DelegationTokenToRenewclass that is used for keeping tracks of DT to renew | 
| Modifier and Type | Field and Description | 
|---|---|
| static long | DEFAULT_RM_SYSTEM_CREDENTIALS_VALID_TIME_REMAINING | 
| static org.apache.hadoop.io.Text | HDFS_DELEGATION_KIND | 
| static String | RM_SYSTEM_CREDENTIALS_VALID_TIME_REMAINING | 
| static String | SCHEME | 
| Constructor and Description | 
|---|
| DelegationTokenRenewer() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addApplicationAsync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                   org.apache.hadoop.security.Credentials ts,
                   boolean shouldCancelAtEnd,
                   String user,
                   org.apache.hadoop.conf.Configuration tokenConf)Asynchronously add application tokens for renewal. | 
| void | addApplicationAsyncDuringRecovery(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                                 org.apache.hadoop.security.Credentials ts,
                                 boolean shouldCancelAtEnd,
                                 String user,
                                 org.apache.hadoop.conf.Configuration tokenConf)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) | 
| 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) | 
| protected ConcurrentMap<org.apache.hadoop.security.token.Token<?>,DelegationTokenRenewer.DelegationTokenToRenew> | getAllTokens() | 
| 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 | setDelegationTokenRenewerPoolTracker(boolean flag) | 
| 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. | 
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final org.apache.hadoop.io.Text HDFS_DELEGATION_KIND
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
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,
                                org.apache.hadoop.conf.Configuration tokenConf)
applicationId - added applicationts - tokensshouldCancelAtEnd - true if tokens should be canceled when the app is
 done else false.user - usertokenConf - tokenConf sent by the app-submitterpublic void addApplicationAsyncDuringRecovery(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                                              org.apache.hadoop.security.Credentials ts,
                                              boolean shouldCancelAtEnd,
                                              String user,
                                              org.apache.hadoop.conf.Configuration tokenConf)
applicationId - added applicationts - tokensshouldCancelAtEnd - true if tokens should be canceled when the app is done else false.user - usertokenConf - tokenConf sent by the app-submitterpublic void addApplicationSync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                               org.apache.hadoop.security.Credentials ts,
                               boolean shouldCancelAtEnd,
                               String user)
                        throws IOException,
                               InterruptedException
IOExceptionInterruptedExceptionprotected void setTimerForTokenRenewal(DelegationTokenRenewer.DelegationTokenToRenew token) throws IOException
IOExceptionprotected void renewToken(DelegationTokenRenewer.DelegationTokenToRenew dttr) throws IOException
IOExceptionprotected org.apache.hadoop.security.token.Token<?>[] obtainSystemTokensForUser(String user, org.apache.hadoop.security.Credentials credentials) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic 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)
public void setDelegationTokenRenewerPoolTracker(boolean flag)
protected ConcurrentMap<org.apache.hadoop.security.token.Token<?>,DelegationTokenRenewer.DelegationTokenToRenew> getAllTokens()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.