|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.mapreduce.JobTasklet
public class JobTasklet
Batch tasklet for executing one Hadoop job. Can be configured to not wait for the job to finish - by default the tasklet waits for the job submitted to finish.
Constructor Summary | |
---|---|
JobTasklet()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
RepeatStatus |
execute(StepContribution contribution,
ChunkContext chunkContext)
|
protected void |
executeJobs()
|
void |
setBeanFactory(BeanFactory beanFactory)
|
void |
setJob(Job job)
Sets the job to execute. |
void |
setJobNames(String... jobName)
Sets the jobs to execute by (bean) name. |
void |
setJobs(Collection<Job> jobs)
Sets the jobs to execute. |
void |
setVerbose(boolean verbose)
Indicates whether the job execution is verbose (the default) or not. |
void |
setWaitForJob(boolean waitForJob)
Indicates whether the tasklet should return for the job to complete (default) after submission or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobTasklet()
Method Detail |
---|
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception
execute
in interface Tasklet
Exception
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected void executeJobs() throws Exception
Exception
public void setJob(Job job)
job
- The job to execute.public void setJobs(Collection<Job> jobs)
jobs
- The job to execute.public void setJobNames(String... jobName)
jobName
- The job to execute.public void setWaitForJob(boolean waitForJob)
waitForJob
- whether to wait for the job to complete or not.public void setVerbose(boolean verbose)
verbose
- whether the job execution is verbose or not.public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |