org.apache.hadoop.yarn.server.resourcemanager.security
Class DelegationTokenRenewer

java.lang.Object
  extended by org.apache.hadoop.yarn.service.AbstractService
      extended by org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer
All Implemented Interfaces:
org.apache.hadoop.yarn.service.Service

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class DelegationTokenRenewer
extends org.apache.hadoop.yarn.service.AbstractService

Service to renew application delegation tokens.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service
org.apache.hadoop.yarn.service.Service.STATE
 
Field Summary
static String SCHEME
           
 
Constructor Summary
DelegationTokenRenewer()
           
 
Method Summary
 void addApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, org.apache.hadoop.security.Credentials ts, boolean shouldCancelAtEnd)
          Add application tokens for renewal.
 void applicationFinished(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
          Removing delegation token for completed applications.
 void init(org.apache.hadoop.conf.Configuration conf)
           
 void start()
           
 void stop()
           
 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.yarn.service.AbstractService
getConfig, getName, getServiceState, getStartTime, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEME

public static final String SCHEME
See Also:
Constant Field Values
Constructor Detail

DelegationTokenRenewer

public DelegationTokenRenewer()
Method Detail

init

public void init(org.apache.hadoop.conf.Configuration conf)
Specified by:
init in interface org.apache.hadoop.yarn.service.Service
Overrides:
init in class org.apache.hadoop.yarn.service.AbstractService

start

public void start()
Specified by:
start in interface org.apache.hadoop.yarn.service.Service
Overrides:
start in class org.apache.hadoop.yarn.service.AbstractService

stop

public void stop()
Specified by:
stop in interface org.apache.hadoop.yarn.service.Service
Overrides:
stop in class org.apache.hadoop.yarn.service.AbstractService

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 application
ts - tokens
shouldCancelAtEnd - true if tokens should be canceled when the app is done else false.
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.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.