org.springframework.data.hadoop.mapreduce
Class JobRunner
java.lang.Object
org.springframework.data.hadoop.mapreduce.JobExecutor
org.springframework.data.hadoop.mapreduce.JobRunner
- All Implemented Interfaces:
- Callable<Void>, Aware, BeanFactoryAware, DisposableBean, InitializingBean
public class JobRunner
- extends JobExecutor
- implements Callable<Void>
Simple runner for submitting Hadoop jobs sequentially. By default, the runner waits for the jobs to finish and returns a boolean indicating
whether all the jobs succeeded or not (when there's no waiting, the status cannot be determined and null is returned).
For more control over the job execution and outcome consider querying the Jobs or using Spring Batch (see the reference documentation for more info).
To make the runner execute at startup, use setRunAtStartup(boolean).
- Author:
- Costin Leau
| Fields inherited from class org.springframework.data.hadoop.mapreduce.JobExecutor |
log |
| Methods inherited from class org.springframework.data.hadoop.mapreduce.JobExecutor |
destroy, findJobs, isKillJobsAtShutdown, isVerbose, isWaitForCompletion, setBeanFactory, setExecutor, setJob, setJobNames, setJobs, setKillJobAtShutdown, setVerbose, setWaitForCompletion, startJobs, startJobs, stopJobs, stopJobs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobRunner
public JobRunner()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface InitializingBean- Overrides:
afterPropertiesSet in class JobExecutor
- Throws:
Exception
call
public Void call()
throws Exception
- Specified by:
call in interface Callable<Void>
- Throws:
Exception
setRunAtStartup
public void setRunAtStartup(boolean runAtStartup)
- Indicates whether the jobs should be submitted at startup (default) or not.
- Parameters:
runAtStartup - The runAtStartup to set.
setPreAction
public void setPreAction(Collection<Callable<?>> actions)
- Actions to be invoked before running the action.
- Parameters:
actions - actions
setPostAction
public void setPostAction(Collection<Callable<?>> actions)
- Actions to be invoked after running the action.
- Parameters:
actions - actions