@InterfaceAudience.Private
@InterfaceStability.Unstable
public class DelegationTokenRenewer
extends org.apache.hadoop.service.AbstractService
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DelegationTokenRenewer.DelegationTokenToRenew
class that is used for keeping tracks of DT to renew
|
| 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)
Asynchronously add application tokens for renewal.
|
void |
addApplicationSync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd)
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 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.
|
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 String SCHEME
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)
applicationId - added applicationts - tokensshouldCancelAtEnd - true if tokens should be canceled when the app is
done else false.IOExceptionpublic void addApplicationSync(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd)
throws IOException
IOExceptionprotected void setTimerForTokenRenewal(DelegationTokenRenewer.DelegationTokenToRenew token) throws IOException
IOExceptionprotected void renewToken(DelegationTokenRenewer.DelegationTokenToRenew dttr) throws IOException
IOExceptionpublic 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)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.