cascading.flow.planner
Class FlowStepJob<Config>

java.lang.Object
  extended by cascading.flow.planner.FlowStepJob<Config>
All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Throwable>
Direct Known Subclasses:
HadoopFlowStepJob, LocalFlowStepJob

public abstract class FlowStepJob<Config>
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Throwable>


Field Summary
protected  BaseFlowStep<Config> flowStep
          Field flowStep
protected  FlowStepStats flowStepStats
          Field stepStats
protected  long pollingInterval
          Field pollingInterval
protected  java.util.List<FlowStepJob<Config>> predecessors
          Field predecessors
protected  long statsStoreInterval
          Field recordStatsInterval
protected  java.lang.String stepName
          Field stepName
protected  java.lang.Throwable throwable
          Field throwable
 
Constructor Summary
FlowStepJob(ClientState clientState, BaseFlowStep flowStep, long pollingInterval, long statsStoreInterval)
           
 
Method Summary
protected  void blockOnJob()
           
protected  void blockOnPredecessors()
           
protected  void blockTillCompleteOrStopped()
           
 java.lang.Throwable call()
           
protected abstract  FlowStepStats createStepStats(ClientState clientState)
           
protected abstract  void dumpDebugInfo()
           
abstract  Config getConfig()
           
 FlowStepStats getStepStats()
          Method getStepStats returns the stepStats of this FlowStepJob object.
protected abstract  java.lang.Throwable getThrowable()
           
protected abstract  boolean internalIsStarted()
           
protected abstract  java.lang.String internalJobId()
           
protected abstract  boolean internalNonBlockingIsComplete()
           
protected abstract  boolean internalNonBlockingIsSuccessful()
           
protected abstract  void internalNonBlockingStart()
           
protected abstract  void internalStop()
           
protected abstract  boolean isRemoteExecution()
           
 boolean isStarted()
          Method wasStarted returns true if this job was started
 boolean isSuccessful()
          Method isSuccessful returns true if this step completed successfully.
 void setPredecessors(java.util.List<FlowStepJob<Config>> predecessors)
           
protected  void sleepForPollingInterval()
           
protected  void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stepName

protected final java.lang.String stepName
Field stepName


pollingInterval

protected long pollingInterval
Field pollingInterval


statsStoreInterval

protected long statsStoreInterval
Field recordStatsInterval


predecessors

protected java.util.List<FlowStepJob<Config>> predecessors
Field predecessors


flowStep

protected final BaseFlowStep<Config> flowStep
Field flowStep


flowStepStats

protected FlowStepStats flowStepStats
Field stepStats


throwable

protected java.lang.Throwable throwable
Field throwable

Constructor Detail

FlowStepJob

public FlowStepJob(ClientState clientState,
                   BaseFlowStep flowStep,
                   long pollingInterval,
                   long statsStoreInterval)
Method Detail

getConfig

public abstract Config getConfig()

createStepStats

protected abstract FlowStepStats createStepStats(ClientState clientState)

stop

public void stop()

internalStop

protected abstract void internalStop()
                              throws java.io.IOException
Throws:
java.io.IOException

setPredecessors

public void setPredecessors(java.util.List<FlowStepJob<Config>> predecessors)

call

public java.lang.Throwable call()
Specified by:
call in interface java.util.concurrent.Callable<java.lang.Throwable>

start

protected void start()

blockOnJob

protected void blockOnJob()
                   throws java.io.IOException
Throws:
java.io.IOException

isRemoteExecution

protected abstract boolean isRemoteExecution()

internalJobId

protected abstract java.lang.String internalJobId()

internalNonBlockingIsSuccessful

protected abstract boolean internalNonBlockingIsSuccessful()
                                                    throws java.io.IOException
Throws:
java.io.IOException

getThrowable

protected abstract java.lang.Throwable getThrowable()

internalNonBlockingStart

protected abstract void internalNonBlockingStart()
                                          throws java.io.IOException
Throws:
java.io.IOException

blockTillCompleteOrStopped

protected void blockTillCompleteOrStopped()
                                   throws java.io.IOException
Throws:
java.io.IOException

internalNonBlockingIsComplete

protected abstract boolean internalNonBlockingIsComplete()
                                                  throws java.io.IOException
Throws:
java.io.IOException

sleepForPollingInterval

protected void sleepForPollingInterval()

blockOnPredecessors

protected void blockOnPredecessors()

dumpDebugInfo

protected abstract void dumpDebugInfo()

isSuccessful

public boolean isSuccessful()
Method isSuccessful returns true if this step completed successfully.

Returns:
the successful (type boolean) of this FlowStepJob object.

isStarted

public boolean isStarted()
Method wasStarted returns true if this job was started

Returns:
boolean

internalIsStarted

protected abstract boolean internalIsStarted()

getStepStats

public FlowStepStats getStepStats()
Method getStepStats returns the stepStats of this FlowStepJob object.

Returns:
the stepStats (type StepStats) of this FlowStepJob object.


Copyright © 2007-2011 Concurrent, Inc. All Rights Reserved.