|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.mapreduce.JobRunner
public class JobRunner
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 theJob
s or using Spring Batch (see the reference documentation for more info).
Constructor Summary | |
---|---|
JobRunner()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
Object |
getObject()
|
Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setIgnoreFailures(boolean ignoreFailures)
Indicates whether job failures are ignored (simply logged) or not (default), meaning the runner propagates the error further down the stack. |
void |
setJobs(Collection<Job> jobs)
Sets the Jobs to run. |
void |
setRunAtStartup(boolean runAtStartup)
Indicates whether the jobs should be submitted at startup or not. |
void |
setWaitForJobs(boolean waitForJobs)
Indicates whether the runner should wait for the jobs to finish (the default) or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobRunner()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public Object getObject() throws Exception
getObject
in interface FactoryBean<Object>
Exception
public Class<?> getObjectType()
getObjectType
in interface FactoryBean<Object>
public boolean isSingleton()
isSingleton
in interface FactoryBean<Object>
public void setRunAtStartup(boolean runAtStartup)
runAtStartup
- The runAtStartup to set.public void setWaitForJobs(boolean waitForJobs)
waitForJobs
- The waitForJobs to set.public void setJobs(Collection<Job> jobs)
jobs
- The jobs to run.public void setIgnoreFailures(boolean ignoreFailures)
ignoreFailures
- the new ignore failuressetWaitForJobs(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |