public abstract class AbstractBatchAppmaster extends AbstractEventingAppmaster implements BatchYarnAppmaster, ContainerLauncherInterceptor
Constructor and Description |
---|
AbstractBatchAppmaster() |
Modifier and Type | Method and Description |
---|---|
void |
addPartitionedStepExecutionStateListener(PartitionedStepExecutionStateListener listener)
Adds the partitioned step execution state listener.
|
void |
addStepSplits(org.springframework.batch.core.StepExecution masterStepExecution,
java.lang.String remoteStepName,
java.util.Set<org.springframework.batch.core.StepExecution> stepExecutions,
java.util.Map<org.springframework.batch.core.StepExecution,ContainerRequestHint> resourceRequests)
Adds the step splits.
|
java.util.List<org.springframework.batch.core.StepExecution> |
getStepExecutions()
Gets the step executions.
|
YarnJobLauncher |
getYarnJobLauncher() |
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 |
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. |
void |
setYarnJobLauncher(YarnJobLauncher yarnJobLauncher) |
getRegisteredContainers, onApplicationEvent, onContainerLaunchRequestFailed, 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, submitApplication
protected void onInit() throws java.lang.Exception
AbstractAppmaster
ApplicationAttemptId
is build during this init method.onInit
in class AbstractEventingAppmaster
java.lang.Exception
- exceptionLifecycleObjectSupport.onInit()
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 statuspublic 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
@Autowired(required=false) public void setYarnJobLauncher(YarnJobLauncher yarnJobLauncher)
public YarnJobLauncher getYarnJobLauncher()
public void addPartitionedStepExecutionStateListener(PartitionedStepExecutionStateListener listener)
addPartitionedStepExecutionStateListener
in interface BatchYarnAppmaster
listener
- the listenerpublic java.util.List<org.springframework.batch.core.StepExecution> getStepExecutions()
getStepExecutions
in interface BatchYarnAppmaster
public void addStepSplits(org.springframework.batch.core.StepExecution masterStepExecution, java.lang.String remoteStepName, java.util.Set<org.springframework.batch.core.StepExecution> stepExecutions, java.util.Map<org.springframework.batch.core.StepExecution,ContainerRequestHint> resourceRequests)
addStepSplits
in interface BatchYarnAppmaster
masterStepExecution
- the partitioned steps parent step executionremoteStepName
- the remote step namestepExecutions
- the step executions splitsresourceRequests
- the request data for step executions