org.springframework.data.hadoop.cascading
Class CascadingTasklet
java.lang.Object
org.springframework.data.hadoop.cascading.CascadingTasklet
- All Implemented Interfaces:
- org.springframework.batch.core.step.tasklet.Tasklet, org.springframework.beans.factory.DisposableBean
public class CascadingTasklet
- extends java.lang.Object
- implements org.springframework.batch.core.step.tasklet.Tasklet
Batch tasklet for executing a Cascade
as part of a job.
- Author:
- Costin Leau
Field Summary |
protected org.apache.commons.logging.Log |
log
|
protected cascading.management.UnitOfWork<? extends cascading.stats.CascadingStats> |
uow
|
protected boolean |
waitToComplete
|
Method Summary |
void |
destroy()
|
protected cascading.stats.CascadingStats |
execute()
|
org.springframework.batch.repeat.RepeatStatus |
execute(org.springframework.batch.core.StepContribution contribution,
org.springframework.batch.core.scope.context.ChunkContext chunkContext)
|
boolean |
isWaitForCompletion()
Indicates whether the 'runner' should wait for the UnitOfWork to complete (default). |
void |
setUnitOfWork(cascading.management.UnitOfWork<? extends cascading.stats.CascadingStats> uow)
Sets the unit of work. |
void |
setWaitForCompletion(boolean waitForCompletion)
Indicates whether the 'runner' should wait for the UnitOfWork 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 |
waitToComplete
protected boolean waitToComplete
uow
protected cascading.management.UnitOfWork<? extends cascading.stats.CascadingStats> uow
log
protected org.apache.commons.logging.Log log
CascadingTasklet
public CascadingTasklet()
execute
public org.springframework.batch.repeat.RepeatStatus execute(org.springframework.batch.core.StepContribution contribution,
org.springframework.batch.core.scope.context.ChunkContext chunkContext)
throws java.lang.Exception
- Specified by:
execute
in interface org.springframework.batch.core.step.tasklet.Tasklet
- Throws:
java.lang.Exception
execute
protected cascading.stats.CascadingStats execute()
destroy
public void destroy()
- Specified by:
destroy
in interface org.springframework.beans.factory.DisposableBean
setUnitOfWork
public void setUnitOfWork(cascading.management.UnitOfWork<? extends cascading.stats.CascadingStats> uow)
- Sets the unit of work. Can be of type
Flow
or Cascade
.
- Parameters:
uow
- the new unit of work.
isWaitForCompletion
public boolean isWaitForCompletion()
- Indicates whether the 'runner' should wait for the UnitOfWork to complete (default).
- Returns:
- whether the runner waits for the unit to complete or not.
setWaitForCompletion
public void setWaitForCompletion(boolean waitForCompletion)
- Indicates whether the 'runner' should wait for the UnitOfWork to complete (default)
after submission or not.
- Parameters:
waitForCompletion
- whether to wait for the unit to complete or not.