org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans
Class PhyPlanVisitor

java.lang.Object
  extended by org.apache.pig.impl.plan.PlanVisitor<PhysicalOperator,PhysicalPlan>
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhyPlanVisitor
Direct Known Subclasses:
MRCompiler, PhyPlanSetter, POPrinter, UDFFinder, UDFFinishVisitor

public class PhyPlanVisitor
extends PlanVisitor<PhysicalOperator,PhysicalPlan>

The visitor class for the Physical Plan. To use this, create the visitor with the plan to be visited. Call the visit() method to traverse the plan in a depth first fashion. This class also visits the nested plans inside the operators. One has to extend this class to modify the nature of each visit and to maintain any relevant state information between the visits to two different operators.


Field Summary
 
Fields inherited from class org.apache.pig.impl.plan.PlanVisitor
mCurrentWalker, mPlan
 
Constructor Summary
PhyPlanVisitor(PhysicalPlan plan, PlanWalker<PhysicalOperator,PhysicalPlan> walker)
           
 
Method Summary
 void visitAdd(Add add)
           
 void visitAnd(POAnd and)
           
 void visitBinCond(POBinCond binCond)
           
 void visitCast(POCast cast)
           
 void visitCollectedGroup(POCollectedGroup mg)
           
 void visitCombinerPackage(POCombinerPackage pkg)
           
 void visitComparisonFunc(POUserComparisonFunc compFunc)
           
 void visitConstant(ConstantExpression cnst)
           
 void visitDemux(PODemux demux)
           
 void visitDistinct(PODistinct distinct)
           
 void visitDivide(Divide dv)
           
 void visitEqualTo(EqualToExpr eq)
           
 void visitFilter(POFilter fl)
           
 void visitFRJoin(POFRJoin join)
           
 void visitGlobalRearrange(POGlobalRearrange gr)
           
 void visitGreaterThan(GreaterThanExpr grt)
           
 void visitGTOrEqual(GTOrEqualToExpr gte)
           
 void visitIsNull(POIsNull isNull)
           
 void visitJoinPackage(POJoinPackage joinPackage)
           
 void visitLessThan(LessThanExpr lt)
           
 void visitLimit(POLimit lim)
           
 void visitLoad(POLoad ld)
           
 void visitLocalRearrange(POLocalRearrange lr)
           
 void visitLocalRearrangeForIllustrate(POLocalRearrangeForIllustrate lrfi)
           
 void visitLTOrEqual(LTOrEqualToExpr lte)
           
 void visitMapLookUp(POMapLookUp mapLookUp)
           
 void visitMergeJoin(POMergeJoin join)
           
 void visitMod(Mod mod)
           
 void visitMultiply(Multiply mul)
           
 void visitMultiQueryPackage(POMultiQueryPackage pkg)
           
 void visitNegative(PONegative negative)
           
 void visitNot(PONot not)
           
 void visitNotEqualTo(NotEqualToExpr eq)
           
 void visitOr(POOr or)
           
 void visitPackage(POPackage pkg)
           
 void visitPartitionRearrange(POPartitionRearrange pr)
           
 void visitPenCogroup(POCogroup cogroup)
           
 void visitPenCross(POCross cross)
           
 void visitPenSplit(POSplit split)
           
 void visitPOForEach(POForEach nfe)
           
 void visitPOOptimizedForEach(POOptimizedForEach optimizedForEach)
           
 void visitPreCombinerLocalRearrange(POPreCombinerLocalRearrange preCombinerLocalRearrange)
           
 void visitProject(POProject proj)
           
 void visitRead(PORead read)
           
 void visitRegexp(PORegexp re)
           
 void visitSkewedJoin(POSkewedJoin sk)
           
 void visitSort(POSort sort)
           
 void visitSplit(POSplit spl)
           
 void visitStore(POStore st)
           
 void visitStream(POStream stream)
           
 void visitSubtract(Subtract sub)
           
 void visitUnion(POUnion un)
           
 void visitUserFunc(POUserFunc userFunc)
           
 
Methods inherited from class org.apache.pig.impl.plan.PlanVisitor
getPlan, popWalker, pushWalker, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhyPlanVisitor

public PhyPlanVisitor(PhysicalPlan plan,
                      PlanWalker<PhysicalOperator,PhysicalPlan> walker)
Method Detail

visitLoad

public void visitLoad(POLoad ld)
               throws VisitorException
Throws:
VisitorException

visitStore

public void visitStore(POStore st)
                throws VisitorException
Throws:
VisitorException

visitFilter

public void visitFilter(POFilter fl)
                 throws VisitorException
Throws:
VisitorException

visitCollectedGroup

public void visitCollectedGroup(POCollectedGroup mg)
                         throws VisitorException
Throws:
VisitorException

visitLocalRearrange

public void visitLocalRearrange(POLocalRearrange lr)
                         throws VisitorException
Throws:
VisitorException

visitGlobalRearrange

public void visitGlobalRearrange(POGlobalRearrange gr)
                          throws VisitorException
Throws:
VisitorException

visitPackage

public void visitPackage(POPackage pkg)
                  throws VisitorException
Throws:
VisitorException

visitCombinerPackage

public void visitCombinerPackage(POCombinerPackage pkg)
                          throws VisitorException
Throws:
VisitorException

visitMultiQueryPackage

public void visitMultiQueryPackage(POMultiQueryPackage pkg)
                            throws VisitorException
Throws:
VisitorException

visitPOForEach

public void visitPOForEach(POForEach nfe)
                    throws VisitorException
Throws:
VisitorException

visitUnion

public void visitUnion(POUnion un)
                throws VisitorException
Throws:
VisitorException

visitSplit

public void visitSplit(POSplit spl)
                throws VisitorException
Throws:
VisitorException

visitDemux

public void visitDemux(PODemux demux)
                throws VisitorException
Throws:
VisitorException

visitDistinct

public void visitDistinct(PODistinct distinct)
                   throws VisitorException
Throws:
VisitorException

visitPenCross

public void visitPenCross(POCross cross)
                   throws VisitorException
Throws:
VisitorException

visitPenCogroup

public void visitPenCogroup(POCogroup cogroup)
                     throws VisitorException
Throws:
VisitorException

visitPenSplit

public void visitPenSplit(POSplit split)
                   throws VisitorException
Throws:
VisitorException

visitRead

public void visitRead(PORead read)
               throws VisitorException
Throws:
VisitorException

visitSort

public void visitSort(POSort sort)
               throws VisitorException
Throws:
VisitorException

visitConstant

public void visitConstant(ConstantExpression cnst)
                   throws VisitorException
Throws:
VisitorException

visitProject

public void visitProject(POProject proj)
                  throws VisitorException
Throws:
VisitorException

visitGreaterThan

public void visitGreaterThan(GreaterThanExpr grt)
                      throws VisitorException
Throws:
VisitorException

visitLessThan

public void visitLessThan(LessThanExpr lt)
                   throws VisitorException
Throws:
VisitorException

visitGTOrEqual

public void visitGTOrEqual(GTOrEqualToExpr gte)
                    throws VisitorException
Throws:
VisitorException

visitLTOrEqual

public void visitLTOrEqual(LTOrEqualToExpr lte)
                    throws VisitorException
Throws:
VisitorException

visitEqualTo

public void visitEqualTo(EqualToExpr eq)
                  throws VisitorException
Throws:
VisitorException

visitNotEqualTo

public void visitNotEqualTo(NotEqualToExpr eq)
                     throws VisitorException
Throws:
VisitorException

visitRegexp

public void visitRegexp(PORegexp re)
                 throws VisitorException
Throws:
VisitorException

visitIsNull

public void visitIsNull(POIsNull isNull)
                 throws VisitorException
Throws:
VisitorException

visitAdd

public void visitAdd(Add add)
              throws VisitorException
Throws:
VisitorException

visitSubtract

public void visitSubtract(Subtract sub)
                   throws VisitorException
Throws:
VisitorException

visitMultiply

public void visitMultiply(Multiply mul)
                   throws VisitorException
Throws:
VisitorException

visitDivide

public void visitDivide(Divide dv)
                 throws VisitorException
Throws:
VisitorException

visitMod

public void visitMod(Mod mod)
              throws VisitorException
Throws:
VisitorException

visitAnd

public void visitAnd(POAnd and)
              throws VisitorException
Throws:
VisitorException

visitOr

public void visitOr(POOr or)
             throws VisitorException
Throws:
VisitorException

visitNot

public void visitNot(PONot not)
              throws VisitorException
Throws:
VisitorException

visitBinCond

public void visitBinCond(POBinCond binCond)

visitNegative

public void visitNegative(PONegative negative)

visitUserFunc

public void visitUserFunc(POUserFunc userFunc)
                   throws VisitorException
Throws:
VisitorException

visitComparisonFunc

public void visitComparisonFunc(POUserComparisonFunc compFunc)
                         throws VisitorException
Throws:
VisitorException

visitMapLookUp

public void visitMapLookUp(POMapLookUp mapLookUp)

visitJoinPackage

public void visitJoinPackage(POJoinPackage joinPackage)
                      throws VisitorException
Throws:
VisitorException

visitCast

public void visitCast(POCast cast)

visitLimit

public void visitLimit(POLimit lim)
                throws VisitorException
Throws:
VisitorException

visitFRJoin

public void visitFRJoin(POFRJoin join)
                 throws VisitorException
Throws:
VisitorException

visitMergeJoin

public void visitMergeJoin(POMergeJoin join)
                    throws VisitorException
Throws:
VisitorException

visitStream

public void visitStream(POStream stream)
                 throws VisitorException
Parameters:
stream -
Throws:
VisitorException

visitSkewedJoin

public void visitSkewedJoin(POSkewedJoin sk)
                     throws VisitorException
Throws:
VisitorException

visitPartitionRearrange

public void visitPartitionRearrange(POPartitionRearrange pr)
                             throws VisitorException
Throws:
VisitorException

visitLocalRearrangeForIllustrate

public void visitLocalRearrangeForIllustrate(POLocalRearrangeForIllustrate lrfi)
                                      throws VisitorException
Parameters:
lrfi -
Throws:
VisitorException

visitPOOptimizedForEach

public void visitPOOptimizedForEach(POOptimizedForEach optimizedForEach)
Parameters:
optimizedForEach -

visitPreCombinerLocalRearrange

public void visitPreCombinerLocalRearrange(POPreCombinerLocalRearrange preCombinerLocalRearrange)
Parameters:
preCombinerLocalRearrange -


Copyright © ${year} The Apache Software Foundation