|
Spring for Apache Hadoop | ||||||||
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.AbstractAppmaster
org.springframework.yarn.am.AbstractServicesAppmaster
org.springframework.yarn.am.AbstractEventingAppmaster
public abstract class AbstractEventingAppmaster
Base implementation of application master where life-cycle is based on events rather than a static information existing prior the start of an instance.
Life-cycle of this instance is not bound to information or states existing prior the startup of an application master. Containers can be requested and launched on demand and application master is then responsible to know when it's time to bail out and end the application.
Due to complex need of event communication, the actual event system is abstracted order to plug different systems for a need of various use cases.
Constructor Summary | |
---|---|
AbstractEventingAppmaster()
|
Method Summary | |
---|---|
void |
onApplicationEvent(AbstractYarnEvent event)
|
protected void |
onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
Invoked when ContainerAllocationEvent is received as an
application event. |
protected void |
onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
Invoked when ContainerCompletedEvent is received as an
application event. |
protected void |
onContainerLaunched(org.apache.hadoop.yarn.api.records.Container container)
Invoked when ContainerLaunchedEvent is received as an
application event. |
Methods inherited from class org.springframework.yarn.am.AbstractServicesAppmaster |
---|
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitor |
Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport |
---|
afterPropertiesSet, doStart, 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 AbstractEventingAppmaster()
Method Detail |
---|
public void onApplicationEvent(AbstractYarnEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<AbstractYarnEvent>
protected void onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
ContainerAllocationEvent
is received as an
application event. Wrapped Container
is passed to a method.
container
- the containerprotected void onContainerLaunched(org.apache.hadoop.yarn.api.records.Container container)
ContainerLaunchedEvent
is received as an
application event. Wrapped Container
is passed to a method.
container
- the containerprotected void onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
ContainerCompletedEvent
is received as an
application event. Wrapped ContainerStatus
is passed to a method.
status
- the container status
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |