|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hive.ql.lib.DefaultGraphWalker
public class DefaultGraphWalker
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
| Field Summary | |
|---|---|
protected Dispatcher |
dispatcher
|
protected Stack<Node> |
opStack
|
protected HashMap<Node,Object> |
retMap
|
protected List<Node> |
toWalk
|
| Constructor Summary | |
|---|---|
DefaultGraphWalker(Dispatcher disp)
Constructor. |
|
| Method Summary | ||
|---|---|---|
void |
dispatch(Node nd,
Stack<Node> ndStack)
Dispatch the current operator. |
|
|
dispatchAndReturn(Node nd,
Stack<Node> ndStack)
Returns dispatch result |
|
Set<Node> |
getDispatchedList()
|
|
List<Node> |
getToWalk()
|
|
void |
startWalking(Collection<Node> startNodes,
HashMap<Node,Object> nodeOutput)
starting point for walking. |
|
void |
walk(Node nd)
walk the current operator and its descendants. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Stack<Node> opStack
protected final List<Node> toWalk
protected final HashMap<Node,Object> retMap
protected final Dispatcher dispatcher
| Constructor Detail |
|---|
public DefaultGraphWalker(Dispatcher disp)
disp - dispatcher to call for each op encountered| Method Detail |
|---|
public List<Node> getToWalk()
public Set<Node> getDispatchedList()
public void dispatch(Node nd,
Stack<Node> ndStack)
throws SemanticException
nd - node being walkedndStack - stack of nodes encountered
SemanticException
public <T> T dispatchAndReturn(Node nd,
Stack<Node> ndStack)
throws SemanticException
SemanticException
public void startWalking(Collection<Node> startNodes,
HashMap<Node,Object> nodeOutput)
throws SemanticException
startWalking in interface GraphWalkerstartNodes - 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.
SemanticException
public void walk(Node nd)
throws SemanticException
nd - current operator in the graph
SemanticException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||