public class StaticEventingAppmaster extends AbstractEventingAppmaster implements YarnAppmaster
Constructor and Description |
---|
StaticEventingAppmaster() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isComplete()
Returns state telling if application is considered
as complete.
|
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 boolean |
onContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
Called if completed container has failed.
|
protected void |
onContainerLaunched(org.apache.hadoop.yarn.api.records.Container container)
Invoked when
ContainerLaunchedEvent is received as an
application event. |
void |
submitApplication()
Submit and run application.
|
getRegisteredContainers, onApplicationEvent, onContainerLaunchRequestFailed, onInit, shutdownContainers
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitor
addAppmasterStateListener, doStop, finishAppmaster, getApplicationAttemptId, getAppmasterClientService, getAppmasterService, getAppmasterTrackService, getCmTemplate, getCommands, getCommands, getConfiguration, getContainerAssign, getContainerShutdown, getEnvironment, getEnvironment, getParameters, getResourceLocalizer, getTemplate, notifyCompleted, registerAppmaster, setCommands, setCommands, setCommands, setCommands, setConfiguration, setContainerAssign, setEnvironment, setEnvironment, setFinalApplicationStatus, setParameters, setResourceLocalizer, setTemplate
afterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAppmasterStateListener, setEnvironment, setParameters
public void submitApplication()
YarnAppmaster
submitApplication
in interface YarnAppmaster
protected void onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
AbstractEventingAppmaster
ContainerAllocationEvent
is received as an
application event. Wrapped Container
is passed to a method.onContainerAllocated
in class AbstractEventingAppmaster
container
- the containerprotected void onContainerLaunched(org.apache.hadoop.yarn.api.records.Container container)
AbstractEventingAppmaster
ContainerLaunchedEvent
is received as an
application event. Wrapped Container
is passed to a method.onContainerLaunched
in class AbstractEventingAppmaster
container
- the containerprotected void onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
AbstractEventingAppmaster
ContainerCompletedEvent
is received as an
application event. Wrapped ContainerStatus
is passed to a method.onContainerCompleted
in class AbstractEventingAppmaster
status
- the container statusprotected boolean onContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
Default implementation doesn't do anything and just returns that failed container wasn't handled.
containerStatus
- the container statusprotected boolean isComplete()
ContainerMonitor.completedCount()
.