org.apache.pig.impl.logicalLayer
Class LOVisitor

java.lang.Object
  extended by org.apache.pig.impl.logicalLayer.LOVisitor
Direct Known Subclasses:
LOPrinter, LOTreePrinter, Optimizer

public abstract class LOVisitor
extends Object

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

LOVisitor

public LOVisitor()
Method Detail

visitCogroup

public void visitCogroup(LOCogroup g)
Only LOCogroup.visit() and subclass implementations of this function should ever call this method.


visitEval

public void visitEval(LOEval e)
Only LOEval.visit() and subclass implementations of this function should ever call this method.


visitUnion

public void visitUnion(LOUnion u)
Only LOUnion.visit() and subclass implementations of this function should ever call this method.


visitLoad

public void visitLoad(LOLoad load)
Only LOLoad.visit() and subclass implementations of this function should ever call this method.


visitSort

public void visitSort(LOSort s)
Only LOSort.visit() and subclass implementations of this function should ever call this method.


visitSplit

public void visitSplit(LOSplit s)
Only LOSplit.visit() and subclass implementations of this function should ever call this method.


visitSplitOutput

public void visitSplitOutput(LOSplitOutput s)

visitStore

public void visitStore(LOStore s)
Only LOStore.visit() and subclass implementations of this function should ever call this method.



Copyright © ${year} The Apache Software Foundation