org.apache.hadoop.hive.ql.lib
Class TaskGraphWalker
java.lang.Object
org.apache.hadoop.hive.ql.lib.TaskGraphWalker
- All Implemented Interfaces:
- GraphWalker
public class TaskGraphWalker
- extends Object
- implements GraphWalker
base class for operator graph walker this class takes list of starting ops
and walks them one by one. it maintains list of walked operators
(dispatchedList) and a list of operators that are discovered but not yet
dispatched
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
opStack
protected Stack<Node> opStack
TaskGraphWalker
public TaskGraphWalker(Dispatcher disp)
- Constructor.
- Parameters:
disp
- dispatcher to call for each op encountered
getToWalk
public List<Node> getToWalk()
- Returns:
- the toWalk
getDispatchedList
public Set<Node> getDispatchedList()
- Returns:
- the doneList
dispatch
public void dispatch(Node nd,
Stack<Node> ndStack,
TaskGraphWalker.TaskGraphWalkerContext walkerCtx)
throws SemanticException
- Dispatch the current operator.
- Parameters:
nd
- node being walkedndStack
- stack of nodes encountered
- Throws:
SemanticException
dispatch
public void dispatch(Node nd,
Stack<Node> ndStack)
throws SemanticException
- Throws:
SemanticException
startWalking
public void startWalking(Collection<Node> startNodes,
HashMap<Node,Object> nodeOutput)
throws SemanticException
- starting point for walking.
- Specified by:
startWalking
in interface GraphWalker
- Parameters:
startNodes
- list of starting operatorsnodeOutput
- If this parameter is not null, the call to the function returns
the map from node to objects returned by the processors.
- Throws:
SemanticException
walk
public void walk(Node nd)
throws SemanticException
- walk the current operator and its descendants.
- Parameters:
nd
- current operator in the graph
- Throws:
SemanticException
Copyright © 2013 The Apache Software Foundation