public abstract class RecursiveGraphTransformer<E extends ElementGraph> extends GraphTransformer<E,E>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TRANSFORM_RECURSION_DEPTH_MAX |
static java.lang.String |
TRANSFORM_RECURSION_DEPTH_MAX
Graphs must be transformed iteratively.
|
Modifier | Constructor and Description |
---|---|
protected |
RecursiveGraphTransformer(ExpressionGraph expressionGraph) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<FlowElement> |
addExclusions(E graph) |
protected ElementGraph |
prepareForMatch(ProcessLogger processLogger,
Transformed<E> transformed,
E graph) |
protected boolean |
requiresRecursiveSearch()
By default, prepareForMatch returns the same graph, but sub-classes may return a sub-graph, one of many
requiring sub-sequent matches.
|
Transformed<E> |
transform(PlannerContext plannerContext,
E rootGraph) |
protected E |
transform(ProcessLogger processLogger,
Transformed<E> transformed,
E graph,
int maxDepth,
int currentDepth) |
protected abstract boolean |
transformGraphInPlaceUsing(Transformed<E> transformed,
E graph,
Match match) |
transform
public static final java.lang.String TRANSFORM_RECURSION_DEPTH_MAX
Some complex graphs may require a very deep search, so this value may need to be increased.
During debugging, the depth may need to be shallow so that the trace logs can be written to disk before an OOME causes the planner to exit.
This property may be either set at the planner )FlowConnector
or system level
System.getProperties()
.
public static final int DEFAULT_TRANSFORM_RECURSION_DEPTH_MAX
protected RecursiveGraphTransformer(ExpressionGraph expressionGraph)
public Transformed<E> transform(PlannerContext plannerContext, E rootGraph)
transform
in class GraphTransformer<E extends ElementGraph,E extends ElementGraph>
protected E transform(ProcessLogger processLogger, Transformed<E> transformed, E graph, int maxDepth, int currentDepth)
protected boolean requiresRecursiveSearch()
if we are searching the whole graph, there is no need to perform a recursion against the new transformed graph
protected java.util.Set<FlowElement> addExclusions(E graph)
protected ElementGraph prepareForMatch(ProcessLogger processLogger, Transformed<E> transformed, E graph)
protected abstract boolean transformGraphInPlaceUsing(Transformed<E> transformed, E graph, Match match)
Copyright © 2007-2017 Cascading Maintainers. All Rights Reserved.