org.apache.hadoop.yarn.server.resourcemanager.security
Class DelegationTokenRenewer
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.service.Service
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class DelegationTokenRenewer
- extends org.apache.hadoop.service.AbstractService
Service to renew application delegation tokens.
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
org.apache.hadoop.service.Service.STATE |
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 |
SCHEME
public static final String SCHEME
- See Also:
- Constant Field Values
DelegationTokenRenewer
public DelegationTokenRenewer()
serviceInit
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
- Overrides:
serviceInit
in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
serviceStart
protected void serviceStart()
throws Exception
- Overrides:
serviceStart
in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
serviceStop
protected void serviceStop()
- Overrides:
serviceStop
in class org.apache.hadoop.service.AbstractService
getDelegationTokens
public Set<org.apache.hadoop.security.token.Token<?>> getDelegationTokens()
addApplication
public void addApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.security.Credentials ts,
boolean shouldCancelAtEnd)
throws IOException
- Add application tokens for renewal.
- Parameters:
applicationId
- added applicationts
- tokensshouldCancelAtEnd
- true if tokens should be canceled when the app is
done else false.
- Throws:
IOException
renewIfServiceIsStarted
protected void renewIfServiceIsStarted(List<DelegationTokenRenewer.DelegationTokenToRenew> dtrs)
throws IOException
- Throws:
IOException
setTimerForTokenRenewal
protected void setTimerForTokenRenewal(DelegationTokenRenewer.DelegationTokenToRenew token)
throws IOException
- set task to renew the token
- Throws:
IOException
renewToken
protected void renewToken(DelegationTokenRenewer.DelegationTokenToRenew dttr)
throws IOException
- Throws:
IOException
applicationFinished
public void applicationFinished(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
- Removing delegation token for completed applications.
- Parameters:
applicationId
- completed application
updateKeepAliveApplications
public void updateKeepAliveApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> appIds)
- Add a list of applications to the keep alive list. If an appId already
exists, update it's keep-alive time.
- Parameters:
appIds
- the list of applicationIds to be kept alive.
setRMContext
public void setRMContext(RMContext rmContext)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.