public abstract class FlowPlanner<F extends BaseFlow,Config> extends Object
Modifier and Type | Class and Description |
---|---|
class |
FlowPlanner.TempTapElementFactory |
Modifier and Type | Field and Description |
---|---|
protected String |
checkpointTapRootPath |
protected AssertionLevel |
defaultAssertionLevel
Field assertionLevel
|
protected DebugLevel |
defaultDebugLevel
Field debugLevel
|
protected Map<Object,Object> |
defaultProperties
Field properties
|
static String |
TRACE_PLAN_PATH
Enables the planner to write out basic planner information including the initial element-graph,
completed element-graph, and the completed step-graph dot files.
|
static String |
TRACE_PLAN_TRANSFORM_PATH
Enables the planner to write out detail level planner information for each rule, including recursive
transforms.
|
static String |
TRACE_STATS_PATH
Enables the planner to write out planner statistics for each planner phase and rule.
|
Constructor and Description |
---|
FlowPlanner() |
Modifier and Type | Method and Description |
---|---|
F |
buildFlow(FlowDef flowDef,
RuleRegistrySet ruleRegistrySet) |
void |
configRuleRegistryDefaults(RuleRegistry ruleRegistry) |
protected abstract F |
createFlow(FlowDef flowDef) |
protected FlowElementGraph |
createFlowElementGraph(FlowDef flowDef,
Pipe[] flowTails) |
FlowNode |
createFlowNode(FlowElementGraph flowElementGraph,
ElementGraph nodeSubGraph,
List<? extends ElementGraph> pipelineGraphs) |
abstract FlowStep<Config> |
createFlowStep(ElementGraph stepElementGraph,
FlowNodeGraph flowNodeGraph) |
protected AssertionLevel |
getAssertionLevel(FlowDef flowDef) |
protected DebugLevel |
getDebugLevel(FlowDef flowDef) |
abstract Config |
getDefaultConfig() |
Map<Object,Object> |
getDefaultProperties() |
abstract PlannerInfo |
getPlannerInfo(String name) |
abstract PlatformInfo |
getPlatformInfo() |
protected PlannerException |
handleExceptionDuringPlanning(FlowDef flowDef,
Exception exception,
FlowElementGraph flowElementGraph) |
void |
initialize(FlowConnector flowConnector,
Map<Object,Object> properties) |
String |
makeFlowNodeName(FlowNode flowNode,
int size,
int ordinal) |
String |
makeFlowStepName(FlowStep flowStep,
int numSteps,
int stepNum) |
protected Tap |
makeTempTap(String name) |
protected abstract Tap |
makeTempTap(String prefix,
String name) |
protected Pipe[] |
resolveAssemblyPlanners(FlowDef flowDef,
Flow flow,
Pipe[] pipes) |
protected Pipe[] |
resolveTails(FlowDef flowDef,
F 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.
|
Exception |
verifyResult(RuleResult ruleResult)
If there are rules for a given
ProcessLevel on the current platform
there must be sub-graphs partitioned at that level. |
protected void |
verifyResultInternal(RuleResult ruleResult) |
protected void |
verifySourceNotSinks(Map<String,Tap> sources,
Map<String,Tap> sinks) |
protected void |
verifyTaps(Map<String,Tap> taps,
boolean areSources,
boolean mayNotBeEmpty)
Method verifyTaps ...
|
protected void |
verifyTraps(FlowDef flowDef,
Pipe[] flowTails) |
public static final String TRACE_PLAN_PATH
public static final String TRACE_PLAN_TRANSFORM_PATH
public static final String TRACE_STATS_PATH
protected Map<Object,Object> defaultProperties
protected String checkpointTapRootPath
protected AssertionLevel defaultAssertionLevel
protected DebugLevel defaultDebugLevel
public FlowPlanner()
public Map<Object,Object> getDefaultProperties()
public abstract Config getDefaultConfig()
public abstract PlannerInfo getPlannerInfo(String name)
public abstract PlatformInfo getPlatformInfo()
public void initialize(FlowConnector flowConnector, Map<Object,Object> properties)
public F buildFlow(FlowDef flowDef, RuleRegistrySet ruleRegistrySet)
protected abstract F createFlow(FlowDef flowDef)
public abstract FlowStep<Config> createFlowStep(ElementGraph stepElementGraph, FlowNodeGraph flowNodeGraph)
public FlowNode createFlowNode(FlowElementGraph flowElementGraph, ElementGraph nodeSubGraph, List<? extends ElementGraph> pipelineGraphs)
public void configRuleRegistryDefaults(RuleRegistry ruleRegistry)
protected Pipe[] resolveTails(FlowDef flowDef, F flow)
protected Pipe[] resolveAssemblyPlanners(FlowDef flowDef, Flow flow, Pipe[] pipes)
protected void verifyAssembly(FlowDef flowDef, Pipe[] tails)
protected void verifyAllTaps(FlowDef flowDef)
protected FlowElementGraph createFlowElementGraph(FlowDef flowDef, Pipe[] flowTails)
protected void verifySourceNotSinks(Map<String,Tap> sources, Map<String,Tap> sinks)
protected void verifyTaps(Map<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 verifyTraps(FlowDef flowDef, Pipe[] flowTails)
protected void verifyCheckpoints(FlowDef flowDef, Pipe[] flowTails)
public Exception verifyResult(RuleResult ruleResult)
ProcessLevel
on the current platform
there must be sub-graphs partitioned at that level.protected void verifyResultInternal(RuleResult ruleResult)
protected PlannerException handleExceptionDuringPlanning(FlowDef flowDef, Exception exception, FlowElementGraph flowElementGraph)
protected Tap makeTempTap(String name)
protected DebugLevel getDebugLevel(FlowDef flowDef)
protected AssertionLevel getAssertionLevel(FlowDef flowDef)
public String makeFlowNodeName(FlowNode flowNode, int size, int ordinal)
public String makeFlowStepName(FlowStep flowStep, int numSteps, int stepNum)
protected abstract Tap makeTempTap(String prefix, String name)
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.