|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.support.LifecycleObjectSupport
org.springframework.yarn.am.allocate.AbstractAllocator
org.springframework.yarn.am.allocate.AbstractPollingAllocator
public abstract class AbstractPollingAllocator
Base implementation of allocator which is meant to handle allocation by doing a simple periodic polling against resource manager.
| Constructor Summary | |
|---|---|
AbstractPollingAllocator()
|
|
| Method Summary | |
|---|---|
protected abstract AllocateResponse |
doContainerRequest()
Subclasses needs to implements this method to do container requests against resource manager. |
protected void |
doStart()
Subclasses may implement this method with the start behavior. |
protected void |
doStop()
Subclasses may implement this method with the stop behavior. |
protected abstract void |
handleAllocatedContainers(List<Container> containers)
Subclasses needs to implement this method to handle newly allocated containers. |
protected abstract void |
handleCompletedContainers(List<ContainerStatus> containerStatuses)
Subclasses needs to implement this method to handle newly released containers. |
protected void |
onInit()
Subclasses may implement this for initialization logic. |
protected void |
populateNmTokenCache(AllocateResponse allocateResponse)
Populate node manager token cache in NMTokenCache. |
protected List<Container> |
preProcessAllocatedContainers(List<Container> containers)
Pre-process allocated containers. |
void |
setTrigger(Trigger trigger)
Sets Trigger used to trigger polling tasks. |
| Methods inherited from class org.springframework.yarn.am.allocate.AbstractAllocator |
|---|
getApplicationAttemptId, getConfiguration, getEnvironment, getRmTemplate, setApplicationAttemptId, setConfiguration, setEnvironment, setRmTemplate |
| Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPollingAllocator()
| Method Detail |
|---|
public void setTrigger(Trigger trigger)
Trigger used to trigger polling tasks.
trigger - trigger to set
protected void onInit()
throws Exception
LifecycleObjectSupportInitializingBean phase. Implementor should
always call super method not to break initialization chain.
onInit in class AbstractAllocatorException - exceptionprotected void doStart()
LifecycleObjectSupportLifecycleObjectSupport.lifecycleLock.
doStart in class LifecycleObjectSupportprotected void doStop()
LifecycleObjectSupportLifecycleObjectSupport.lifecycleLock.
doStop in class LifecycleObjectSupportprotected abstract AllocateResponse doContainerRequest()
handleAllocatedContainers(List) and
handleCompletedContainers(List).
AllocateResponse from a resource managerprotected List<Container> preProcessAllocatedContainers(List<Container> containers)
containers - the containers
protected abstract void handleAllocatedContainers(List<Container> containers)
containers - list of newly allocate containersprotected abstract void handleCompletedContainers(List<ContainerStatus> containerStatuses)
containerStatuses - list of newly released containersprotected void populateNmTokenCache(AllocateResponse allocateResponse)
NMTokenCache.
allocateResponse - the allocate response
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||