Examples of visit()


Examples of org.apache.pig.backend.hadoop.executionengine.tez.plan.optimizer.UnionOptimizer.visit()

        // Use VertexGroup in Tez
        boolean isUnionOpt = conf.getBoolean(PigConfiguration.TEZ_OPT_UNION, true);
        if (isUnionOpt) {
            UnionOptimizer uo = new UnionOptimizer(tezPlan);
            uo.visit();
        }

    }

    public static void processLoadAndParallelism(TezOperPlan tezPlan, PigContext pc) throws VisitorException {
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.util.ParallelConstantVisitor.visit()

                                            if (partitionerPred.isSampleAggregation()) {
                                                LOG.debug("Updating constant value to " + parallelism + " in " + partitionerPred.plan);
                                                LOG.info("Increased requested parallelism of " + partitionerPred.getOperatorKey() + " to " + parallelism);
                                                ParallelConstantVisitor visitor =
                                                        new ParallelConstantVisitor(partitionerPred.plan, parallelism);
                                                visitor.visit();
                                                break;
                                            }
                                        }
                                        break;
                                    }
View Full Code Here

Examples of org.apache.pig.backend.local.executionengine.physicalLayer.LocalLogToPhyTranslationVisitor.visit()

        LocalLogToPhyTranslationVisitor visitor = new LocalLogToPhyTranslationVisitor(
                plan);
        visitor.setPigContext(pigContext);
        try {
            visitor.visit();
        } catch (VisitorException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            log.error("Error visiting the logical plan in ExampleGenerator");
        }
View Full Code Here

Examples of org.apache.pig.experimental.logical.LogicalPlanMigrationVistor.visit()

            if (getConfiguration().getProperty("pig.usenewlogicalplan", "false").equals("true")) {
                log.info("pig.usenewlogicalplan is set to true. New logical plan will be used.");
               
                // translate old logical plan to new plan
                LogicalPlanMigrationVistor visitor = new LogicalPlanMigrationVistor(plan);
                visitor.visit();
                org.apache.pig.experimental.logical.relational.LogicalPlan newPlan = visitor.getNewLogicalPlan();
               
                // set uids
                UidStamper stamper = new UidStamper(newPlan);
                stamper.visit();
View Full Code Here

Examples of org.apache.pig.experimental.logical.expression.LogicalExpressionVisitor.visit()

   
    @Override
    public void visitLOFilter(LOFilter filter) throws IOException {
        currentOp = filter;
        LogicalExpressionVisitor v = getVisitor(filter.getFilterPlan());
        v.visit();
    }
   
    @Override
    public void visitLOJoin(LOJoin join) throws IOException {
        currentOp = join;
View Full Code Here

Examples of org.apache.pig.experimental.logical.optimizer.PlanPrinter.visit()

   
    public static void printPlan(org.apache.pig.experimental.logical.relational.LogicalPlan logicalPlan ) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        PrintStream ps = new PrintStream(out);
        PlanPrinter pp = new PlanPrinter(logicalPlan,ps);
        pp.visit();
        System.err.println(out.toString());
    }

    public static void printPlan(LogicalPlan logicalPlan) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.pig.experimental.logical.optimizer.UidStamper.visit()

                visitor.visit();
                org.apache.pig.experimental.logical.relational.LogicalPlan newPlan = visitor.getNewLogicalPlan();
               
                // set uids
                UidStamper stamper = new UidStamper(newPlan);
                stamper.visit();
               
                // run optimizer
                org.apache.pig.experimental.logical.optimizer.LogicalPlanOptimizer optimizer =
                    new org.apache.pig.experimental.logical.optimizer.LogicalPlanOptimizer(newPlan, 100);
                optimizer.optimize();
View Full Code Here

Examples of org.apache.pig.experimental.logical.relational.LogToPhyTranslationVisitor.visit()

public class TestExperimentalLogToPhyTranslationVisitor extends TestCase {

    private PhysicalPlan translatePlan(OperatorPlan plan) throws IOException {
        LogToPhyTranslationVisitor visitor = new LogToPhyTranslationVisitor(plan);
        visitor.visit();
        return visitor.getPhysicalPlan();
    }
   
    private org.apache.pig.experimental.logical.relational.LogicalPlan migratePlan(LogicalPlan lp) throws VisitorException{
        LogicalPlanMigrationVistor visitor = new LogicalPlanMigrationVistor(lp);       
View Full Code Here

Examples of org.apache.pig.impl.eval.EvalSpec.visit()

                // Now, we need to adjust the expected projection for the
                // eval spec(s) we just pushed.  Also, this will change the
                // function to be the final instead of general instance.
                EvalSpec newSpec = spec.copy(pigContext);
                newSpec.visit(new ReduceAdjuster(pigContext));
                mro.addReduceSpec(newSpec);

                // Adjust the function name for the combine spec, to set it
                // to the initial function instead of the general
                // instance.  Make a copy of the eval spec rather than
View Full Code Here

Examples of org.apache.pig.impl.eval.GenerateSpec.visit()

        }

        // Third, walk the entire tree of the generate spec and see if we
        // can combine it.
        CombineDeterminer cd = new CombineDeterminer();
        gen.visit(cd);
        return cd.useCombiner();
    }

    private class ReduceAdjuster extends EvalSpecVisitor {
        private int position = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.