org.springframework.yarn.batch.am
Class AbstractBatchAppmaster
java.lang.Object
org.springframework.yarn.support.LifecycleObjectSupport
org.springframework.yarn.am.AbstractAppmaster
org.springframework.yarn.am.AbstractServicesAppmaster
org.springframework.yarn.am.AbstractEventingAppmaster
org.springframework.yarn.batch.am.AbstractBatchAppmaster
- All Implemented Interfaces:
- EventListener, Aware, BeanFactoryAware, InitializingBean, ApplicationListener<org.springframework.yarn.event.AbstractYarnEvent>, Lifecycle, Phased, SmartLifecycle, org.springframework.yarn.am.ContainerLauncherInterceptor, org.springframework.yarn.am.YarnAppmaster, BatchYarnAppmaster
- Direct Known Subclasses:
- BatchAppmaster
public abstract class AbstractBatchAppmaster
- extends org.springframework.yarn.am.AbstractEventingAppmaster
- implements BatchYarnAppmaster, org.springframework.yarn.am.ContainerLauncherInterceptor
Base application master for running batch jobs.
- Author:
- Janne Valkealahti
| Methods inherited from class org.springframework.yarn.am.AbstractEventingAppmaster |
onApplicationEvent, onContainerLaunchRequestFailed |
| Methods inherited from class org.springframework.yarn.am.AbstractServicesAppmaster |
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitor |
| Methods inherited from class org.springframework.yarn.am.AbstractAppmaster |
addAppmasterStateListener, doStop, finishAppmaster, getApplicationAttemptId, getAppmasterClientService, getAppmasterService, getAppmasterTrackService, getCommands, getConfiguration, getContainerAssign, getEnvironment, getParameters, getResourceLocalizer, getTemplate, notifyCompleted, registerAppmaster, setCommands, setCommands, setConfiguration, setContainerAssign, setEnvironment, setFinalApplicationStatus, setParameters, setResourceLocalizer, setTemplate |
| Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport |
afterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.yarn.am.YarnAppmaster |
addAppmasterStateListener, setEnvironment, setParameters, submitApplication |
AbstractBatchAppmaster
public AbstractBatchAppmaster()
onInit
protected void onInit()
throws Exception
- Overrides:
onInit in class org.springframework.yarn.am.AbstractAppmaster
- Throws:
Exception
onContainerAllocated
protected void onContainerAllocated(Container container)
- Overrides:
onContainerAllocated in class org.springframework.yarn.am.AbstractEventingAppmaster
onContainerLaunched
protected void onContainerLaunched(Container container)
- Overrides:
onContainerLaunched in class org.springframework.yarn.am.AbstractEventingAppmaster
onContainerCompleted
protected void onContainerCompleted(ContainerStatus status)
- Overrides:
onContainerCompleted in class org.springframework.yarn.am.AbstractEventingAppmaster
preLaunch
public ContainerLaunchContext preLaunch(Container container,
ContainerLaunchContext context)
- Specified by:
preLaunch in interface org.springframework.yarn.am.ContainerLauncherInterceptor
setYarnJobLauncher
@Autowired(required=false)
public void setYarnJobLauncher(YarnJobLauncher yarnJobLauncher)
getYarnJobLauncher
public YarnJobLauncher getYarnJobLauncher()
addPartitionedStepExecutionStateListener
public void addPartitionedStepExecutionStateListener(PartitionedStepExecutionStateListener listener)
- Adds the partitioned step execution state listener.
- Specified by:
addPartitionedStepExecutionStateListener in interface BatchYarnAppmaster
- Parameters:
listener - the listener
getStepExecutions
public List<StepExecution> getStepExecutions()
- Gets the step executions.
- Specified by:
getStepExecutions in interface BatchYarnAppmaster
- Returns:
- the step executions
addStepSplits
public void addStepSplits(StepExecution masterStepExecution,
String remoteStepName,
Set<StepExecution> stepExecutions,
Map<StepExecution,org.springframework.yarn.am.container.ContainerRequestHint> resourceRequests)
- Adds the step splits.
- Specified by:
addStepSplits in interface BatchYarnAppmaster
- Parameters:
masterStepExecution - the partitioned steps parent step executionremoteStepName - the remote step namestepExecutions - the step executions splitsresourceRequests - the request data for step executions