cascading.flow
Class ElementGraph

java.lang.Object
  extended by 
      extended by cascading.flow.ElementGraph

public class ElementGraph
extends

Class ElementGraph represents the executable FlowElement graph.


Nested Class Summary
static class ElementGraph.Extent
           
 
Constructor Summary
ElementGraph(Pipe[] pipes, Map<String,Tap> sources, Map<String,Tap> sinks, Map<String,Tap> traps, AssertionLevel assertionLevel)
          Constructor ElementGraph creates a new ElementGraph instance.
 
Method Summary
 ElementGraph copyElementGraph()
          Method copyGraph returns a partial copy of the current ElementGraph.
 List<Every> findAllEveries()
          Method findAllEveries ...
 List<Group> findAllGroups()
          Method findAllGroups ...
 List<Group> findAllMergeJoinGroups()
          Finds all groups that merge/join streams.
<P> List<P>
findAllOfType(int minInDegree, Class<P> type, List<P> results)
          Method findAllOfType ...
 List<> getAllShortestPathsBetween(FlowElement from, FlowElement to)
          Method getAllShortestPathsBetween ...
 List<> getAllShortestPathsBetweenExtents()
          Method getAllShortestPathsBetweenExtents returns the allShortestPathsBetweenExtents of this ElementGraph object.
 List<> getAllShortestPathsFrom(FlowElement flowElement)
          Method getAllShortestPathsFrom ...
 List<> getAllShortestPathsTo(FlowElement flowElement)
          Method getAllShortestPathsTo ...
  getDepthFirstIterator()
          Method getDepthFirstIterator returns the depthFirstIterator of this ElementGraph object.
 int getMaxNumPathsBetweenElementAndMergJoin(FlowElement flowElement)
           
  getTopologicalIterator()
          Method getTopologicalIterator returns the topologicalIterator of this ElementGraph object.
 void insertFlowElementAfter(FlowElement previousElement, FlowElement flowElement)
           
  makeTapGraph()
          Method makeTapGraph returns a directed graph of all taps in the current element graph.
protected  void printElementGraph(String filename,  graph)
           
 void removeUnnecessaryPipes()
          Method removeEmptyPipes performs a depth first traversal and removes instance of Pipe or SubAssembly.
 void resolveFields()
          Method resolveFields performs a breadth first traversal and resolves the tuple fields between each Pipe instance.
 void writeDOT(String filename)
          Method writeDOT writes this element graph to a DOT file for easy vizualization and debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementGraph

public ElementGraph(Pipe[] pipes,
                    Map<String,Tap> sources,
                    Map<String,Tap> sinks,
                    Map<String,Tap> traps,
                    AssertionLevel assertionLevel)
Constructor ElementGraph creates a new ElementGraph instance.

Parameters:
pipes - of type Pipe[]
sources - of type Map
sinks - of type Map
assertionLevel - of type AssertionLevel
Method Detail

copyElementGraph

public ElementGraph copyElementGraph()
Method copyGraph returns a partial copy of the current ElementGraph. Only Vertices and Edges are copied.

Returns:
ElementGraph

getTopologicalIterator

public  getTopologicalIterator()
Method getTopologicalIterator returns the topologicalIterator of this ElementGraph object.

Returns:
the topologicalIterator (type TopologicalOrderIterator) of this ElementGraph object.

getAllShortestPathsFrom

public List<> getAllShortestPathsFrom(FlowElement flowElement)
Method getAllShortestPathsFrom ...

Parameters:
flowElement - of type FlowElement
Returns:
List>

getAllShortestPathsTo

public List<> getAllShortestPathsTo(FlowElement flowElement)
Method getAllShortestPathsTo ...

Parameters:
flowElement - of type FlowElement
Returns:
List>

getAllShortestPathsBetweenExtents

public List<> getAllShortestPathsBetweenExtents()
Method getAllShortestPathsBetweenExtents returns the allShortestPathsBetweenExtents of this ElementGraph object.

Returns:
the allShortestPathsBetweenExtents (type List>) of this ElementGraph object.

getAllShortestPathsBetween

public List<> getAllShortestPathsBetween(FlowElement from,
                                              FlowElement to)
Method getAllShortestPathsBetween ...

Parameters:
from - of type FlowElement
to - of type FlowElement
Returns:
List>

getDepthFirstIterator

public  getDepthFirstIterator()
Method getDepthFirstIterator returns the depthFirstIterator of this ElementGraph object.

Returns:
the depthFirstIterator (type DepthFirstIterator) of this ElementGraph object.

writeDOT

public void writeDOT(String filename)
Method writeDOT writes this element graph to a DOT file for easy vizualization and debugging.

Parameters:
filename - of type String

printElementGraph

protected void printElementGraph(String filename,
                                  graph)

removeUnnecessaryPipes

public void removeUnnecessaryPipes()
Method removeEmptyPipes performs a depth first traversal and removes instance of Pipe or SubAssembly.


resolveFields

public void resolveFields()
Method resolveFields performs a breadth first traversal and resolves the tuple fields between each Pipe instance.


findAllMergeJoinGroups

public List<Group> findAllMergeJoinGroups()
Finds all groups that merge/join streams. returned in topological order.

Returns:

findAllGroups

public List<Group> findAllGroups()
Method findAllGroups ...

Returns:
List

findAllEveries

public List<Every> findAllEveries()
Method findAllEveries ...

Returns:
List

findAllOfType

public <P> List<P> findAllOfType(int minInDegree,
                                 Class<P> type,
                                 List<P> results)
Method findAllOfType ...

Parameters:
minInDegree - of type int
type - of type Class

results - of type List

Returns:
List


insertFlowElementAfter

public void insertFlowElementAfter(FlowElement previousElement,
                                   FlowElement flowElement)

makeTapGraph

public  makeTapGraph()
Method makeTapGraph returns a directed graph of all taps in the current element graph.

Returns:
SimpleDirectedGraph

getMaxNumPathsBetweenElementAndMergJoin

public int getMaxNumPathsBetweenElementAndMergJoin(FlowElement flowElement)


Copyright © 2007-2009 Concurrent, Inc. All Rights Reserved.