|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.newplan.PlanVisitor
public abstract class PlanVisitor
A visitor mechanism for navigating and operating on a plan of Operators. This class contains the logic to traverse the plan. It does not visit individual nodes. That is left to implementing classes (such as LOVisitor).
Field Summary | |
---|---|
protected PlanWalker |
currentWalker
Guaranteed to always point to the walker currently being used. |
protected static String |
DEFAULT_SCOPE
|
protected OperatorPlan |
plan
|
Constructor Summary | |
---|---|
protected |
PlanVisitor(OperatorPlan plan,
PlanWalker walker)
|
Method Summary | |
---|---|
OperatorPlan |
getPlan()
|
protected void |
popWalker()
Pop the next to previous walker off of the stack and set it as the current walker. |
protected void |
pushWalker(PlanWalker walker)
Push the current walker onto the stack of saved walkers and begin using the newly passed walker as the current walker. |
void |
visit()
Entry point for visiting the plan. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String DEFAULT_SCOPE
protected OperatorPlan plan
protected PlanWalker currentWalker
Constructor Detail |
---|
protected PlanVisitor(OperatorPlan plan, PlanWalker walker)
plan
- OperatorPlan this visitor will visit.walker
- PlanWalker this visitor will use to traverse the plan.Method Detail |
---|
public void visit() throws FrontendException
VisitorException
- if an error is encountered while visiting.
FrontendException
public OperatorPlan getPlan()
protected void pushWalker(PlanWalker walker)
walker
- new walker to set as the current walker.protected void popWalker() throws FrontendException
VisitorException
- if there are no more walkers on the stack. In
this case the current walker is not reset.
FrontendException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |