public abstract class FlowPlanner<F extends Flow,Config>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AssertionLevel |
assertionLevel
Field assertionLevel
|
protected java.lang.String |
checkpointRootPath |
protected DebugLevel |
debugLevel
Field debugLevel
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
properties
Field properties
|
Constructor and Description |
---|
FlowPlanner() |
Modifier and Type | Method and Description |
---|---|
abstract F |
buildFlow(FlowDef flowDef)
Method buildFlow renders the actual Flow instance.
|
protected ElementGraph |
createElementGraph(FlowDef flowDef,
Pipe[] flowTails) |
protected abstract Flow |
createFlow(FlowDef flowDef) |
protected void |
failOnGroupEverySplit(ElementGraph elementGraph) |
protected void |
failOnLoneGroupAssertion(ElementGraph elementGraph)
Verifies that there are not only GroupAssertions following any given Group instance.
|
protected void |
failOnMissingGroup(ElementGraph elementGraph) |
protected void |
failOnMisusedBuffer(ElementGraph elementGraph) |
abstract Config |
getConfig() |
abstract PlatformInfo |
getPlatformInfo() |
java.util.Map<java.lang.Object,java.lang.Object> |
getProperties() |
protected PlannerException |
handleExceptionDuringPlanning(java.lang.Exception exception,
ElementGraph elementGraph) |
protected void |
handleJobPartitioning(ElementGraph elementGraph)
Inserts a temporary Tap between logical MR jobs.
|
protected void |
handleJoins(ElementGraph elementGraph)
Prevent leftmost sources from sourcing a downstream join on the rightmost side intra-task by inserting a
temp tap between the left-sourced join and right-sourced join.
|
protected void |
handleNonSafeOperations(ElementGraph elementGraph) |
void |
initialize(FlowConnector flowConnector,
java.util.Map<java.lang.Object,java.lang.Object> properties) |
protected void |
insertTempTapAfter(ElementGraph graph,
Pipe pipe)
Method insertTapAfter ...
|
protected Tap |
makeTempTap(java.lang.String name) |
protected abstract Tap |
makeTempTap(java.lang.String prefix,
java.lang.String name) |
protected Pipe[] |
resolveAssemblyPlanners(FlowDef flowDef,
Flow flow,
Pipe[] pipes) |
protected Pipe[] |
resolveTails(FlowDef flowDef,
Flow<Config> flow) |
protected void |
verifyAllTaps(FlowDef flowDef) |
protected void |
verifyAssembly(FlowDef flowDef,
Pipe[] tails) |
protected void |
verifyCheckpoints(FlowDef flowDef,
Pipe[] flowTails) |
protected void |
verifyPipeAssemblyEndPoints(FlowDef flowDef,
Pipe[] flowTails)
Method verifyEndPoints verifies
there aren't dupe names in heads or tails.
|
protected void |
verifySourceNotSinks(java.util.Map<java.lang.String,Tap> sources,
java.util.Map<java.lang.String,Tap> sinks) |
protected void |
verifyTaps(java.util.Map<java.lang.String,Tap> taps,
boolean areSources,
boolean mayNotBeEmpty)
Method verifyTaps ...
|
protected void |
verifyTraps(FlowDef flowDef,
Pipe[] flowTails) |
protected java.util.Map<java.lang.Object,java.lang.Object> properties
protected java.lang.String checkpointRootPath
protected AssertionLevel assertionLevel
protected DebugLevel debugLevel
public java.util.Map<java.lang.Object,java.lang.Object> getProperties()
public abstract Config getConfig()
public abstract PlatformInfo getPlatformInfo()
public void initialize(FlowConnector flowConnector, java.util.Map<java.lang.Object,java.lang.Object> properties)
public abstract F buildFlow(FlowDef flowDef)
flowDef
- protected Pipe[] resolveAssemblyPlanners(FlowDef flowDef, Flow flow, Pipe[] pipes)
protected void verifyAllTaps(FlowDef flowDef)
protected ElementGraph createElementGraph(FlowDef flowDef, Pipe[] flowTails)
protected void verifySourceNotSinks(java.util.Map<java.lang.String,Tap> sources, java.util.Map<java.lang.String,Tap> sinks)
protected void verifyTaps(java.util.Map<java.lang.String,Tap> taps, boolean areSources, boolean mayNotBeEmpty)
taps
- of type MapareSources
- of type booleanmayNotBeEmpty
- of type booleanprotected void verifyPipeAssemblyEndPoints(FlowDef flowDef, Pipe[] flowTails)
protected void failOnLoneGroupAssertion(ElementGraph elementGraph)
protected void failOnMissingGroup(ElementGraph elementGraph)
protected void failOnMisusedBuffer(ElementGraph elementGraph)
protected void failOnGroupEverySplit(ElementGraph elementGraph)
protected PlannerException handleExceptionDuringPlanning(java.lang.Exception exception, ElementGraph elementGraph)
protected void handleNonSafeOperations(ElementGraph elementGraph)
protected void insertTempTapAfter(ElementGraph graph, Pipe pipe)
graph
- of type PipeGraphpipe
- of type Pipeprotected Tap makeTempTap(java.lang.String name)
protected abstract Tap makeTempTap(java.lang.String prefix, java.lang.String name)
protected void handleJobPartitioning(ElementGraph elementGraph)
elementGraph
- of type PipeGraphprotected void handleJoins(ElementGraph elementGraph)
elementGraph
-