cascading.flow.planner.iso.transformer

## Class RecursiveGraphTransformer<E extends ElementGraph>

- java.lang.Object
- - cascading.flow.planner.iso.transformer.GraphTransformer<E,E>
  - - cascading.flow.planner.iso.transformer.RecursiveGraphTransformer<E>

- Direct Known Subclasses:
    AnnotateGraphTransformer, ContractedTransformer, MutateGraphTransformer

      public abstract class RecursiveGraphTransformer<E extends ElementGraph>
      extends GraphTransformer<E,E>

- - ### Field Summary

    Fields
    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.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RecursiveGraphTransformer(ExpressionGraph expressionGraph)`

  - ### Method Summary

    Methods
    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)`

    - ### Methods inherited from class cascading.flow.planner.iso.transformer.GraphTransformer

      `transform`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TRANSFORM_RECURSION_DEPTH_MAX

          public static final java.lang.String TRANSFORM_RECURSION_DEPTH_MAX

      Graphs must be transformed iteratively. In order to offset rules that may cause a loop, the recursion depth must be tracked.

      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()`.
      See Also:
        Constant Field Values

    - #### DEFAULT_TRANSFORM_RECURSION_DEPTH_MAX

          public static final int DEFAULT_TRANSFORM_RECURSION_DEPTH_MAX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RecursiveGraphTransformer

          protected RecursiveGraphTransformer(ExpressionGraph expressionGraph)

  - ### Method Detail

    - #### transform

          public Transformed<E> transform(PlannerContext plannerContext,
                                 E rootGraph)

      Specified by:
        `transform` in class `GraphTransformer<E extends ElementGraph,E extends ElementGraph>`

    - #### transform

          protected E transform(ProcessLogger processLogger,
                    Transformed<E> transformed,
                    E graph,
                    int maxDepth,
                    int currentDepth)

    - #### requiresRecursiveSearch

          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.

      if we are searching the whole graph, there is no need to perform a recursion against the new transformed graph

    - #### addExclusions

          protected java.util.Set<FlowElement> addExclusions(E graph)

    - #### prepareForMatch

          protected ElementGraph prepareForMatch(ProcessLogger processLogger,
                                     Transformed<E> transformed,
                                     E graph)

    - #### transformGraphInPlaceUsing

          protected abstract boolean transformGraphInPlaceUsing(Transformed<E> transformed,
                                           E graph,
                                           Match match)

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.