|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.flow.planner.BaseFlowStep<Config>
public abstract class BaseFlowStep<Config>
Class FlowStep is an internal representation of a given Job to be executed on a remote cluster. During planning, pipe assemblies are broken down into "steps" and encapsulated in this class.
FlowSteps are submitted in order of dependency. If two or more steps do not share the same dependencies and all can be scheduled simultaneously, thegetSubmitPriority()
value determines the order in which
all steps will be submitted for execution. The default submit priority is 5.
This class is for internal use, there are no stable public methods.
Field Summary | |
---|---|
protected Map<HashJoin,Set<Tap>> |
accumulatedSourcesByJoin
|
protected Map<Tap,Set<String>> |
sinks
Field sink |
protected Map<Tap,Set<String>> |
sources
Field sources |
protected Map<HashJoin,Tap> |
streamedSourceByJoin
|
protected Tap |
tempSink
Field tempSink |
Fields inherited from interface cascading.flow.FlowStep |
---|
CASCADING_FLOW_STEP_ID |
Constructor Summary | |
---|---|
protected |
BaseFlowStep(String name,
int stepNum)
|
Method Summary | |
---|---|
void |
addAccumulatedSourceFor(HashJoin join,
Tap accumulatedSource)
|
void |
addGroup(Group group)
|
void |
addListener(FlowStepListener flowStepListener)
Method addListener registers the given FlowStepListener with this instance. |
void |
addSink(String name,
Tap sink)
|
void |
addSource(String name,
Tap source)
|
void |
addStreamedSourceFor(HashJoin join,
Tap streamedSource)
|
void |
clean()
|
abstract void |
clean(Config config)
|
protected Throwable |
commitSinks()
|
boolean |
containsPipeNamed(String pipeName)
Returns true if this FlowStep contains a pipe/branch with the given name. |
protected ClientState |
createClientState(FlowProcess flowProcess)
|
protected abstract FlowStepJob |
createFlowStepJob(FlowProcess<Config> flowProcess,
Config parentConfig)
|
boolean |
equals(Object object)
|
protected void |
fireOnCompleted()
|
protected void |
fireOnRunning()
|
protected void |
fireOnStarting()
|
protected void |
fireOnStopping()
|
protected void |
fireOnThrowable(Throwable throwable)
|
Set<Tap> |
getAllAccumulatedSources()
|
Collection<Operation> |
getAllOperations()
|
Config |
getConfig()
Method getConfig returns the current initialized configuration. |
Flow<Config> |
getFlow()
|
String |
getFlowID()
|
String |
getFlowName()
Method getParentFlowName returns the parentFlowName of this FlowStep object. |
FlowStepJob<Config> |
getFlowStepJob(FlowProcess<Config> flowProcess,
Config parentConfig)
|
FlowStepStats |
getFlowStepStats()
|
org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope> |
getGraph()
|
Group |
getGroup()
|
List<Group> |
getGroups()
|
String |
getID()
Method getId returns the id of this FlowStep object. |
protected abstract Config |
getInitializedConfig(FlowProcess<Config> flowProcess,
Config parentConfig)
|
Set<Tap> |
getJoinTributariesBetween(FlowElement from,
FlowElement to)
|
String |
getName()
Method getName returns the name of this FlowStep object. |
FlowElement |
getNextFlowElement(Scope scope)
|
Scope |
getNextScope(FlowElement flowElement)
Method getNextScope returns the next Scope instance in the graph. |
Set<Scope> |
getNextScopes(FlowElement flowElement)
|
Set<Scope> |
getPreviousScopes(FlowElement flowElement)
Method getPreviousScopes returns the previous Scope instances. |
Scope |
getScopeFor(FlowElement sourceElement,
FlowElement targetElement)
|
Tap |
getSink()
|
Set<String> |
getSinkName(Tap sink)
|
Set<Tap> |
getSinks()
|
Tap |
getSinkWith(String identifier)
|
Set<String> |
getSourceName(Tap source)
|
Set<Tap> |
getSources()
|
Tap |
getSourceWith(String identifier)
|
String |
getStepDisplayName()
Method getStepDisplayName returns the stepDisplayName of this FlowStep object. |
protected String |
getStepDisplayName(int idLength)
|
int |
getStepNum()
|
Map<HashJoin,Tap> |
getStreamedSourceByJoin()
|
int |
getSubmitPriority()
Method getSubmitPriority returns the submitPriority of this FlowStep object. |
List<FlowElement> |
getSuccessors(FlowElement element)
|
org.jgrapht.traverse.TopologicalOrderIterator<FlowElement,Scope> |
getTopologicalOrderIterator()
|
int |
hashCode()
|
boolean |
hasListeners()
Method hasListeners returns true if FlowStepListener instances have been registered. |
protected void |
initConfFromProcessConfigDef(ConfigDef.Setter setter)
|
boolean |
isDebugEnabled()
|
boolean |
isInfoEnabled()
|
void |
logDebug(String message)
|
void |
logError(String message,
Throwable throwable)
|
void |
logInfo(String message)
|
void |
logWarn(String message)
|
void |
logWarn(String message,
Throwable throwable)
|
protected Throwable |
prepareResources()
|
boolean |
removeListener(FlowStepListener flowStepListener)
Method removeListener removes the given flowStepListener from this instance. |
protected Throwable |
rollbackSinks()
|
protected void |
setConf(Config conf)
|
void |
setFlow(Flow<Config> flow)
|
protected void |
setFlowName(String flowName)
|
void |
setSubmitPriority(int submitPriority)
Method setSubmitPriority sets the submitPriority of this FlowStep object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface cascading.flow.FlowStep |
---|
getTrap, getTraps |
Field Detail |
---|
protected final Map<Tap,Set<String>> sources
protected final Map<Tap,Set<String>> sinks
protected Tap tempSink
protected final Map<HashJoin,Tap> streamedSourceByJoin
protected final Map<HashJoin,Set<Tap>> accumulatedSourcesByJoin
Constructor Detail |
---|
protected BaseFlowStep(String name, int stepNum)
Method Detail |
---|
public String getID()
FlowStep
getID
in interface FlowStep<Config>
public int getStepNum()
getStepNum
in interface FlowStep<Config>
public String getName()
FlowStep
getName
in interface FlowStep<Config>
public void setFlow(Flow<Config> flow)
public Flow<Config> getFlow()
getFlow
in interface FlowStep<Config>
public String getFlowID()
getFlowID
in interface FlowStep<Config>
public String getFlowName()
FlowStep
getFlowName
in interface FlowStep<Config>
protected void setFlowName(String flowName)
public Config getConfig()
FlowStep
getConfig
in interface FlowStep<Config>
protected void setConf(Config conf)
public String getStepDisplayName()
FlowStep
getStepDisplayName
in interface FlowStep<Config>
protected String getStepDisplayName(int idLength)
public int getSubmitPriority()
FlowStep
getSubmitPriority
in interface FlowStep<Config>
public void setSubmitPriority(int submitPriority)
FlowStep
setSubmitPriority
in interface FlowStep<Config>
submitPriority
- the submitPriority of this FlowStep object.public FlowStepStats getFlowStepStats()
getFlowStepStats
in interface FlowStep<Config>
public org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope> getGraph()
public Group getGroup()
getGroup
in interface FlowStep<Config>
public List<Group> getGroups()
getGroups
in interface FlowStep<Config>
public void addGroup(Group group)
public Map<HashJoin,Tap> getStreamedSourceByJoin()
getStreamedSourceByJoin
in interface FlowStep<Config>
public void addStreamedSourceFor(HashJoin join, Tap streamedSource)
public Set<Tap> getAllAccumulatedSources()
getAllAccumulatedSources
in interface FlowStep<Config>
public void addAccumulatedSourceFor(HashJoin join, Tap accumulatedSource)
public void addSource(String name, Tap source)
public void addSink(String name, Tap sink)
public Set<Tap> getSources()
getSources
in interface FlowStep<Config>
public Set<Tap> getSinks()
getSinks
in interface FlowStep<Config>
public Tap getSink()
getSink
in interface FlowStep<Config>
public Set<String> getSourceName(Tap source)
getSourceName
in interface FlowStep<Config>
public Set<String> getSinkName(Tap sink)
getSinkName
in interface FlowStep<Config>
public Tap getSourceWith(String identifier)
getSourceWith
in interface FlowStep<Config>
public Tap getSinkWith(String identifier)
getSinkWith
in interface FlowStep<Config>
protected Throwable prepareResources()
protected Throwable commitSinks()
protected Throwable rollbackSinks()
protected abstract Config getInitializedConfig(FlowProcess<Config> flowProcess, Config parentConfig)
public Set<Scope> getPreviousScopes(FlowElement flowElement)
flowElement
- of type FlowElement
public Scope getNextScope(FlowElement flowElement)
flowElement
- of type FlowElement
public Scope getScopeFor(FlowElement sourceElement, FlowElement targetElement)
public Set<Scope> getNextScopes(FlowElement flowElement)
public FlowElement getNextFlowElement(Scope scope)
public org.jgrapht.traverse.TopologicalOrderIterator<FlowElement,Scope> getTopologicalOrderIterator()
public List<FlowElement> getSuccessors(FlowElement element)
public Set<Tap> getJoinTributariesBetween(FlowElement from, FlowElement to)
public Collection<Operation> getAllOperations()
public boolean containsPipeNamed(String pipeName)
FlowStep
containsPipeNamed
in interface FlowStep<Config>
pipeName
- the name of the Pipe
public void clean()
public abstract void clean(Config config)
public boolean hasListeners()
FlowStep
FlowStepListener
instances have been registered.
hasListeners
in interface FlowStep<Config>
public void addListener(FlowStepListener flowStepListener)
FlowStep
FlowStepListener
with this instance.
addListener
in interface FlowStep<Config>
flowStepListener
- of type flowStepListenerpublic boolean removeListener(FlowStepListener flowStepListener)
FlowStep
removeListener
in interface FlowStep<Config>
flowStepListener
- of type FlowStepListener
protected void fireOnCompleted()
protected void fireOnThrowable(Throwable throwable)
protected void fireOnStopping()
protected void fireOnStarting()
protected void fireOnRunning()
public boolean equals(Object object)
equals
in class Object
protected ClientState createClientState(FlowProcess flowProcess)
public FlowStepJob<Config> getFlowStepJob(FlowProcess<Config> flowProcess, Config parentConfig)
protected abstract FlowStepJob createFlowStepJob(FlowProcess<Config> flowProcess, Config parentConfig)
protected void initConfFromProcessConfigDef(ConfigDef.Setter setter)
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public final boolean isInfoEnabled()
public final boolean isDebugEnabled()
public void logDebug(String message)
public void logInfo(String message)
public void logWarn(String message)
public void logWarn(String message, Throwable throwable)
public void logError(String message, Throwable throwable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |