public abstract class AbstractEventingAppmaster extends AbstractServicesAppmaster implements org.springframework.context.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(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. |
protected void |
onContainerLaunchRequestFailed(org.apache.hadoop.yarn.api.records.Container container)
Invoked when
ContainerLaunchRequestFailedEvent is received as an
application event. |
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitor
addAppmasterStateListener, doStop, finishAppmaster, getApplicationAttemptId, getAppmasterClientService, getAppmasterService, getAppmasterTrackService, getCommands, getConfiguration, getContainerAssign, getEnvironment, getParameters, getResourceLocalizer, getTemplate, notifyCompleted, onInit, registerAppmaster, setCommands, setCommands, setConfiguration, setContainerAssign, setEnvironment, setFinalApplicationStatus, setParameters, setResourceLocalizer, setTemplate
afterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
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 onContainerLaunchRequestFailed(org.apache.hadoop.yarn.api.records.Container container)
ContainerLaunchRequestFailedEvent
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