public abstract class AbstractProcessingAppmaster extends AbstractServicesAppmaster implements ContainerLauncherInterceptor
We can say that the actual implementation of this is very static in terms of what application master can do. Everything needs to be known prior to starting the life-cycle. Implementation should know how many containers will participate the application, what those containers will do and what is the expected outcome from a container execution.
| Constructor and Description |
|---|
AbstractProcessingAppmaster() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
Called when container has been allocated.
|
protected void |
onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
Called when container has been completed.
|
protected void |
onInit()
Global application master instance specific
ApplicationAttemptId
is build during this init method. |
org.apache.hadoop.yarn.api.records.ContainerLaunchContext |
preLaunch(org.apache.hadoop.yarn.api.records.Container container,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext context)
Invoked before the
ContainerLaunchContext is used
to launch the container. |
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitoraddAppmasterStateListener, 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, shutdownContainersafterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stopprotected void onInit()
throws java.lang.Exception
AbstractAppmasterApplicationAttemptId
is build during this init method.onInit in class AbstractAppmasterjava.lang.Exception - exceptionLifecycleObjectSupport.onInit()public org.apache.hadoop.yarn.api.records.ContainerLaunchContext preLaunch(org.apache.hadoop.yarn.api.records.Container container,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext context)
ContainerLauncherInterceptorContainerLaunchContext is used
to launch the container.preLaunch in interface ContainerLauncherInterceptorcontainer - the Containercontext - the ContainerLaunchContextContainerLaunchContextprotected void onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
container - the containerprotected void onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
status - the status