org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class SampleOptimizer

java.lang.Object
  extended by org.apache.pig.impl.plan.PlanVisitor<MapReduceOper,MROperPlan>
      extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.plans.MROpPlanVisitor
          extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.SampleOptimizer

public class SampleOptimizer
extends MROpPlanVisitor

A visitor to optimize plans that have a sample job that immediately follows a load/store only MR job. These kinds of plans are generated for order bys, and will soon be generated for joins that need to sample their data first. These can be changed so that the RandomSampleLoader subsumes the loader used in the first job and then removes the first job.


Field Summary
 
Fields inherited from class org.apache.pig.impl.plan.PlanVisitor
mCurrentWalker, mPlan
 
Constructor Summary
SampleOptimizer(MROperPlan plan, PigContext pigContext)
           
 
Method Summary
 void visit()
          Entry point for visiting the plan.
 void visitMROp(MapReduceOper mr)
           
 
Methods inherited from class org.apache.pig.impl.plan.PlanVisitor
getPlan, popWalker, pushWalker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleOptimizer

public SampleOptimizer(MROperPlan plan,
                       PigContext pigContext)
Method Detail

visit

public void visit()
           throws VisitorException
Description copied from class: PlanVisitor
Entry point for visiting the plan.

Overrides:
visit in class PlanVisitor<MapReduceOper,MROperPlan>
Throws:
VisitorException - if an error is encountered while visiting.

visitMROp

public void visitMROp(MapReduceOper mr)
               throws VisitorException
Overrides:
visitMROp in class MROpPlanVisitor
Throws:
VisitorException


Copyright © ${year} The Apache Software Foundation