public class ExecutionGraphIterator extends Object implements Iterator<ExecutionVertex>
Iterator interface which allows to
traverse an execution graph and visit every reachable vertex exactly once. The order
in which the vertices are visited corresponds to the order of their discovery in a depth first
search.
This class is not thread-safe.
| Constructor and Description |
|---|
ExecutionGraphIterator(ExecutionGraph executionGraph,
boolean forward)
Creates a new execution graph iterator.
|
ExecutionGraphIterator(ExecutionGraph executionGraph,
ExecutionVertex startVertex,
boolean forward)
Creates a new execution graph iterator.
|
ExecutionGraphIterator(ExecutionGraph executionGraph,
int startStage,
boolean confinedToStage,
boolean forward)
Creates a new execution graph iterator.
|
public ExecutionGraphIterator(ExecutionGraph executionGraph, boolean forward)
executionGraph - the execution graph that should be traversedforward - true if the graph should be traversed in correct order, false to traverse it in
reverse orderpublic ExecutionGraphIterator(ExecutionGraph executionGraph, int startStage, boolean confinedToStage, boolean forward)
executionGraph - the execution graph that should be traversedstartStage - the index of the stage of the graph where the traversal is supposed to beginconfinedToStage - false if the graph iterator is allowed to traverse to upper (in case of reverse order
traversal lower) stages, true otherwise.forward - true if the graph should be traversed in correct order, false to traverse it in
reverse orderpublic ExecutionGraphIterator(ExecutionGraph executionGraph, ExecutionVertex startVertex, boolean forward)
startVertex.
The iterator will not switch to the next input/output vertex of an output/input vertex
has been reached.executionGraph - the execution graph that should be traversedstartVertex - the vertex to start the traversal fromforward - true if the graph should be traversed in correct order, false to reverse it in
reverse orderpublic boolean hasNext()
hasNext in interface Iterator<ExecutionVertex>public ExecutionVertex next()
next in interface Iterator<ExecutionVertex>public void remove()
remove in interface Iterator<ExecutionVertex>Copyright © 2014 The Apache Software Foundation. All rights reserved.