org.springframework.yarn.batch.am
Class BatchAppmaster
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
org.springframework.yarn.batch.am.BatchAppmaster
- All Implemented Interfaces:
- java.util.EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<AbstractYarnEvent>, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, ContainerLauncherInterceptor, YarnAppmaster, BatchYarnAppmaster
public class BatchAppmaster
- extends AbstractBatchAppmaster
- implements YarnAppmaster, org.springframework.context.ApplicationContextAware
Implementation of application master which can be used to
run Spring Batch jobs on Hadoop Yarn cluster.
Application master will act as a context running the Spring
Batch job. Order to make some sense in terms of using cluster
resources, job itself should be able to partition itself in
a way that Yarn containers can be used to split the load.
- Author:
- Janne Valkealahti
Methods inherited from class org.springframework.yarn.batch.am.AbstractBatchAppmaster |
addPartitionedStepExecutionStateListener, addStepSplits, getJobName, getJobParametersConverter, getStepExecutions, onContainerAllocated, onContainerCompleted, onContainerLaunched, onInit, preLaunch, runJob, setJobLauncher, setJobName, setJobParametersConverter |
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, 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 |
BatchAppmaster
public BatchAppmaster()
submitApplication
public void submitApplication()
- Description copied from interface:
YarnAppmaster
- Submit and run application.
- Specified by:
submitApplication
in interface YarnAppmaster
onApplicationEvent
public void onApplicationEvent(AbstractYarnEvent event)
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener<AbstractYarnEvent>
- Overrides:
onApplicationEvent
in class AbstractEventingAppmaster
doStart
protected void doStart()
- Description copied from class:
LifecycleObjectSupport
- Subclasses may implement this method with the start behavior. This
method will be invoked while holding the
LifecycleObjectSupport.lifecycleLock
.
- Overrides:
doStart
in class LifecycleObjectSupport
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
getJobLauncher
public org.springframework.batch.core.launch.JobLauncher getJobLauncher()
- Description copied from class:
AbstractBatchAppmaster
- Gets the job launcher.
- Overrides:
getJobLauncher
in class AbstractBatchAppmaster
- Returns:
- the job launcher