public abstract class AbstractEventingAppmaster extends AbstractServicesAppmaster implements ApplicationListener<AbstractYarnEvent>
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 and Description |
|---|
AbstractEventingAppmaster() |
| Modifier and Type | Method and Description |
|---|---|
void |
onApplicationEvent(AbstractYarnEvent event) |
protected void |
onContainerAllocated(Container container)
Invoked when
ContainerAllocationEvent is received as an
application event. |
protected void |
onContainerCompleted(ContainerStatus status)
Invoked when
ContainerCompletedEvent is received as an
application event. |
protected void |
onContainerLaunched(Container container)
Invoked when
ContainerLaunchedEvent is received as an
application event. |
protected void |
onContainerLaunchRequestFailed(Container container)
Invoked when
ContainerLaunchRequestFailedEvent is received as an
application event. |
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitoraddAppmasterStateListener, doStop, finishAppmaster, getApplicationAttemptId, getAppmasterClientService, getAppmasterService, getAppmasterTrackService, getCommands, getConfiguration, getContainerAssign, getEnvironment, getParameters, getResourceLocalizer, getTemplate, notifyCompleted, onInit, registerAppmaster, setCommands, setCommands, setConfiguration, setContainerAssign, setEnvironment, setFinalApplicationStatus, setParameters, setResourceLocalizer, setTemplateafterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stoppublic void onApplicationEvent(AbstractYarnEvent event)
onApplicationEvent in interface ApplicationListener<AbstractYarnEvent>protected void onContainerAllocated(Container container)
ContainerAllocationEvent is received as an
application event. Wrapped Container is passed to a method.container - the containerprotected void onContainerLaunched(Container container)
ContainerLaunchedEvent is received as an
application event. Wrapped Container is passed to a method.container - the containerprotected void onContainerLaunchRequestFailed(Container container)
ContainerLaunchRequestFailedEvent is received as an
application event. Wrapped Container is passed to a method.container - the containerprotected void onContainerCompleted(ContainerStatus status)
ContainerCompletedEvent is received as an
application event. Wrapped ContainerStatus is passed to a method.status - the container status