|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.logicalLayer.LOVisitor
public abstract class LOVisitor
A visitor mechanism for navigating and operating on a tree of Logical Operators. This class contains the logic to navigate thre tree, but does not do anything with or to the tree. In order to operate on or extract information from the tree, extend this class. You only need to implement the methods dealing with the logical operators you are concerned with. For example, if you wish to find every LOEval in a logical plan and perform some operation on it, your visitor would look like: class MyLOVisitor extends LOVisitor { public void visitEval(LOEval e) { you're logic here } } Any operators that you do not implement the visitX method for will then be navigated through by this class. *NOTE* When envoking a visitor, you should never call one of the methods in this class. You should pass your visitor as an argument to visit() on the object you want to visit. So: RIGHT: LOEval myEval; MyVisitor v; myEval.visit(v); WRONG: LOEval myEval; MyVisitor v; v.visitEval(myEval); These methods are only public to make them accessible to the LO* objects.
Constructor Summary | |
---|---|
LOVisitor()
|
Method Summary | |
---|---|
void |
visitCogroup(LOCogroup g)
Only LOCogroup.visit() and subclass implementations of this function should ever call this method. |
void |
visitEval(LOEval e)
Only LOEval.visit() and subclass implementations of this function should ever call this method. |
void |
visitLoad(LOLoad load)
Only LOLoad.visit() and subclass implementations of this function should ever call this method. |
void |
visitSort(LOSort s)
Only LOSort.visit() and subclass implementations of this function should ever call this method. |
void |
visitSplit(LOSplit s)
Only LOSplit.visit() and subclass implementations of this function should ever call this method. |
void |
visitSplitOutput(LOSplitOutput s)
|
void |
visitStore(LOStore s)
Only LOStore.visit() and subclass implementations of this function should ever call this method. |
void |
visitUnion(LOUnion u)
Only LOUnion.visit() and subclass implementations of this function should ever call this method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LOVisitor()
Method Detail |
---|
public void visitCogroup(LOCogroup g)
public void visitEval(LOEval e)
public void visitUnion(LOUnion u)
public void visitLoad(LOLoad load)
public void visitSort(LOSort s)
public void visitSplit(LOSplit s)
public void visitSplitOutput(LOSplitOutput s)
public void visitStore(LOStore s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |