public abstract class BaseFlowStep<Config> extends java.lang.Object implements java.io.Serializable, FlowStep<Config>
getSubmitPriority()
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.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<HashJoin,java.util.Set<Tap>> |
accumulatedSourcesByJoin |
protected java.util.Map<Tap,java.util.Set<java.lang.String>> |
sinks
Field sink
|
protected java.util.Map<Tap,java.util.Set<java.lang.String>> |
sources
Field sources
|
protected java.util.Map<HashJoin,Tap> |
streamedSourceByJoin |
protected Tap |
tempSink
Field tempSink
|
CASCADING_FLOW_STEP_ID
Modifier | Constructor and Description |
---|---|
protected |
BaseFlowStep(java.lang.String name,
int stepNum) |
Modifier and Type | Method and Description |
---|---|
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(java.lang.String name,
Tap sink) |
void |
addSource(java.lang.String name,
Tap source) |
void |
addStreamedSourceFor(HashJoin join,
Tap streamedSource) |
void |
clean() |
abstract void |
clean(Config config) |
protected java.lang.Throwable |
commitSinks() |
boolean |
containsPipeNamed(java.lang.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(java.lang.Object object) |
protected void |
fireOnCompleted() |
protected void |
fireOnRunning() |
protected void |
fireOnStarting() |
protected void |
fireOnStopping() |
protected void |
fireOnThrowable(java.lang.Throwable throwable) |
java.util.Set<Tap> |
getAllAccumulatedSources() |
java.util.Collection<Operation> |
getAllOperations() |
Config |
getConfig()
Method getConfig returns the current initialized configuration.
|
Flow<Config> |
getFlow() |
java.lang.String |
getFlowID() |
java.lang.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() |
java.util.List<Group> |
getGroups() |
java.lang.String |
getID()
Method getId returns the id of this FlowStep object.
|
protected abstract Config |
getInitializedConfig(FlowProcess<Config> flowProcess,
Config parentConfig) |
java.util.Set<Tap> |
getJoinTributariesBetween(FlowElement from,
FlowElement to) |
java.lang.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.
|
java.util.Set<Scope> |
getNextScopes(FlowElement flowElement) |
java.util.Set<Scope> |
getPreviousScopes(FlowElement flowElement)
Method getPreviousScopes returns the previous Scope instances.
|
Scope |
getScopeFor(FlowElement sourceElement,
FlowElement targetElement) |
Tap |
getSink() |
java.util.Set<java.lang.String> |
getSinkName(Tap sink) |
java.util.Set<Tap> |
getSinks() |
Tap |
getSinkWith(java.lang.String identifier) |
java.util.Set<java.lang.String> |
getSourceName(Tap source) |
java.util.Set<Tap> |
getSources() |
Tap |
getSourceWith(java.lang.String identifier) |
java.lang.String |
getStepDisplayName()
Method getStepDisplayName returns the stepDisplayName of this FlowStep object.
|
protected java.lang.String |
getStepDisplayName(int idLength) |
int |
getStepNum() |
java.util.Map<HashJoin,Tap> |
getStreamedSourceByJoin() |
int |
getSubmitPriority()
Method getSubmitPriority returns the submitPriority of this FlowStep object.
|
java.util.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(java.lang.String message) |
void |
logError(java.lang.String message,
java.lang.Throwable throwable) |
void |
logInfo(java.lang.String message) |
void |
logWarn(java.lang.String message) |
void |
logWarn(java.lang.String message,
java.lang.Throwable throwable) |
boolean |
removeListener(FlowStepListener flowStepListener)
Method removeListener removes the given flowStepListener from this instance.
|
protected java.lang.Throwable |
rollbackSinks() |
protected void |
setConf(Config conf) |
void |
setFlow(Flow<Config> flow) |
protected void |
setFlowName(java.lang.String flowName) |
void |
setSubmitPriority(int submitPriority)
Method setSubmitPriority sets the submitPriority of this FlowStep object.
|
java.lang.String |
toString() |
protected final java.util.Map<Tap,java.util.Set<java.lang.String>> sources
protected final java.util.Map<Tap,java.util.Set<java.lang.String>> sinks
protected Tap tempSink
public java.lang.String getID()
FlowStep
public int getStepNum()
getStepNum
in interface FlowStep<Config>
public java.lang.String getName()
FlowStep
public java.lang.String getFlowName()
FlowStep
getFlowName
in interface FlowStep<Config>
protected void setFlowName(java.lang.String flowName)
public Config getConfig()
FlowStep
protected void setConf(Config conf)
public java.lang.String getStepDisplayName()
FlowStep
getStepDisplayName
in interface FlowStep<Config>
protected java.lang.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 java.util.List<Group> getGroups()
public void addGroup(Group group)
public java.util.Map<HashJoin,Tap> getStreamedSourceByJoin()
getStreamedSourceByJoin
in interface FlowStep<Config>
public java.util.Set<Tap> getAllAccumulatedSources()
getAllAccumulatedSources
in interface FlowStep<Config>
public void addSource(java.lang.String name, Tap source)
public void addSink(java.lang.String name, Tap sink)
public java.util.Set<Tap> getSources()
getSources
in interface FlowStep<Config>
public java.util.Set<java.lang.String> getSourceName(Tap source)
getSourceName
in interface FlowStep<Config>
public java.util.Set<java.lang.String> getSinkName(Tap sink)
getSinkName
in interface FlowStep<Config>
public Tap getSourceWith(java.lang.String identifier)
getSourceWith
in interface FlowStep<Config>
public Tap getSinkWith(java.lang.String identifier)
getSinkWith
in interface FlowStep<Config>
protected java.lang.Throwable commitSinks()
protected java.lang.Throwable rollbackSinks()
protected abstract Config getInitializedConfig(FlowProcess<Config> flowProcess, Config parentConfig)
public java.util.Set<Scope> getPreviousScopes(FlowElement flowElement)
flowElement
- of type FlowElementpublic Scope getNextScope(FlowElement flowElement)
flowElement
- of type FlowElementpublic Scope getScopeFor(FlowElement sourceElement, FlowElement targetElement)
public java.util.Set<Scope> getNextScopes(FlowElement flowElement)
public FlowElement getNextFlowElement(Scope scope)
public org.jgrapht.traverse.TopologicalOrderIterator<FlowElement,Scope> getTopologicalOrderIterator()
public java.util.List<FlowElement> getSuccessors(FlowElement element)
public java.util.Set<Tap> getJoinTributariesBetween(FlowElement from, FlowElement to)
public java.util.Collection<Operation> getAllOperations()
public boolean containsPipeNamed(java.lang.String pipeName)
FlowStep
containsPipeNamed
in interface FlowStep<Config>
pipeName
- the name of the Pipepublic 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 FlowStepListenerprotected void fireOnCompleted()
protected void fireOnThrowable(java.lang.Throwable throwable)
protected void fireOnStopping()
protected void fireOnStarting()
protected void fireOnRunning()
public boolean equals(java.lang.Object object)
equals
in class java.lang.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 java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public final boolean isInfoEnabled()
public final boolean isDebugEnabled()
public void logDebug(java.lang.String message)
public void logInfo(java.lang.String message)
public void logWarn(java.lang.String message)
public void logWarn(java.lang.String message, java.lang.Throwable throwable)
public void logError(java.lang.String message, java.lang.Throwable throwable)