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, 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, shutdownContainers
afterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
protected void onInit() throws java.lang.Exception
AbstractAppmaster
ApplicationAttemptId
is build during this init method.onInit
in class AbstractAppmaster
java.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)
ContainerLauncherInterceptor
ContainerLaunchContext
is used
to launch the container.preLaunch
in interface ContainerLauncherInterceptor
container
- the Container
context
- the ContainerLaunchContext
ContainerLaunchContext
protected 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