org.apache.pig.impl.plan.optimizer
Class PlanOptimizer<O extends Operator,P extends OperatorPlan<O>>
java.lang.Object
org.apache.pig.impl.plan.optimizer.PlanOptimizer<O,P>
- Direct Known Subclasses:
- FunctionalLogicalOptimizer, LogicalOptimizer
public abstract class PlanOptimizer<O extends Operator,P extends OperatorPlan<O>>
- extends Object
A class to optimize plans. This class need not be subclassed for a
particular type of plan. It can be instantiated with a set of Rules and
then optimize called.
Method Summary |
void |
optimize()
Run the optimizer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mRules
protected List<Rule> mRules
mPlan
protected P extends OperatorPlan<O> mPlan
PlanOptimizer
protected PlanOptimizer(P plan)
- Parameters:
plan
- Plan to optimize
optimize
public final void optimize()
throws OptimizerException
- Run the optimizer. This method attempts to match each of the Rules
against the plan. If a Rule matches, it then calls the check
method of the associated Transformer to give the it a chance to
check whether it really wants to do the optimization. If that
returns true as well, then Transformer.transform is called.
- Throws:
OptimizerException
Copyright © ${year} The Apache Software Foundation