org.apache.pig.impl.logicalLayer.validators
Class LogicalPlanValidationExecutor

java.lang.Object
  extended by org.apache.pig.impl.logicalLayer.validators.LogicalPlanValidationExecutor
All Implemented Interfaces:
PlanValidationExecutor<LogicalPlan>

public class LogicalPlanValidationExecutor
extends Object
implements PlanValidationExecutor<LogicalPlan>

This class is responsible for all logical plan validations after the parsing stage. All the validation logics should be added in the constructor.


Constructor Summary
LogicalPlanValidationExecutor(LogicalPlan plan, PigContext pigContext, boolean beforeOptimizer)
          All the necessary validation logics can be plugged-in here.
 
Method Summary
 void validate(LogicalPlan plan, CompilationMessageCollector msgCollector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicalPlanValidationExecutor

public LogicalPlanValidationExecutor(LogicalPlan plan,
                                     PigContext pigContext,
                                     boolean beforeOptimizer)
All the necessary validation logics can be plugged-in here. Logics are executed from head to tail of the List. In the PIG-111 Configuration patch, we can call pigContext.getProperties which holds current configuration set. This allows us to let users enable/disable some validation logics. The code will look like this:- if ((Boolean)pigContext.getProperties().getProperty("pig.compiler.validationX") ) { validatorList.add(new ValidationLogicX(plan)) ; }

Method Detail

validate

public void validate(LogicalPlan plan,
                     CompilationMessageCollector msgCollector)
              throws PlanValidationException
Specified by:
validate in interface PlanValidationExecutor<LogicalPlan>
Throws:
PlanValidationException


Copyright © ${year} The Apache Software Foundation