|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public abstract class AbstractBatchAppmaster
Base application master for running batch jobs.
Constructor Summary | |
---|---|
AbstractBatchAppmaster()
|
Method Summary | |
---|---|
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. |
org.springframework.batch.core.launch.JobLauncher |
getJobLauncher()
Gets the job launcher. |
java.lang.String |
getJobName()
Gets the job name. |
org.springframework.batch.core.converter.JobParametersConverter |
getJobParametersConverter()
Gets the job parameters converter. |
java.util.List<org.springframework.batch.core.StepExecution> |
getStepExecutions()
Gets the step executions. |
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 |
runJob(org.springframework.batch.core.Job job)
Runs the given job. |
void |
setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
Sets the job launcher. |
void |
setJobName(java.lang.String jobName)
Sets the job name. |
void |
setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter jobParametersConverter)
Injection setter for JobParametersConverter . |
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.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 |
Constructor Detail |
---|
public AbstractBatchAppmaster()
Method Detail |
---|
protected void onInit() throws java.lang.Exception
AbstractAppmaster
ApplicationAttemptId
is build during this init method.
onInit
in class AbstractAppmaster
java.lang.Exception
LifecycleObjectSupport.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
public void runJob(org.springframework.batch.core.Job job)
job
- the job to runpublic void addPartitionedStepExecutionStateListener(PartitionedStepExecutionStateListener listener)
addPartitionedStepExecutionStateListener
in interface BatchYarnAppmaster
listener
- the listenerpublic org.springframework.batch.core.launch.JobLauncher getJobLauncher()
public void setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
jobLauncher
- the new job launcherpublic java.lang.String getJobName()
public void setJobName(java.lang.String jobName)
jobName
- the new job namepublic 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 executionspublic org.springframework.batch.core.converter.JobParametersConverter getJobParametersConverter()
public void setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter jobParametersConverter)
JobParametersConverter
.
jobParametersConverter
-
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |