org.springframework.data.hadoop.cascading
Class CascadeRunner

java.lang.Object
  extended by org.springframework.data.hadoop.cascading.CascadeRunner
All Implemented Interfaces:
Callable<CascadingStats>, DisposableBean, InitializingBean

public class CascadeRunner
extends Object
implements InitializingBean, DisposableBean, Callable<CascadingStats>

Simple runner for executing Cascades or Flows. By default, the runner waits for the jobs to finish and returns its status. To make the runner execute at startup, use setRunAtStartup(boolean).

Author:
Costin Leau

Constructor Summary
CascadeRunner()
           
 
Method Summary
 void afterPropertiesSet()
           
 CascadingStats call()
           
 void destroy()
           
 void setPostAction(Collection<Callable<?>> actions)
          Actions to be invoked after running the action.
 void setPreAction(Collection<Callable<?>> actions)
          Actions to be invoked before running the action.
 void setRunAtStartup(boolean runAtStartup)
          Sets the run at startup.
 void setUnitOfWork(UnitOfWork<CascadingStats> uow)
          Sets the unit of work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CascadeRunner

public CascadeRunner()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean

call

public CascadingStats call()
                    throws Exception
Specified by:
call in interface Callable<CascadingStats>
Throws:
Exception

setUnitOfWork

public void setUnitOfWork(UnitOfWork<CascadingStats> uow)
Sets the unit of work. Can be of type Flow or Cascade.

Parameters:
uow - the new unit of work.

setRunAtStartup

public void setRunAtStartup(boolean runAtStartup)
Sets the run at startup.

Parameters:
runAtStartup - The runAtStartup to set.

setPreAction

public void setPreAction(Collection<Callable<?>> actions)
Actions to be invoked before running the action.

Parameters:
actions -

setPostAction

public void setPostAction(Collection<Callable<?>> actions)
Actions to be invoked after running the action.

Parameters:
actions -