Examples of optimize()


Examples of org.apache.pig.impl.logicalLayer.optimizer.Optimizer.optimize()

                                                              func,
                                                              pigContext);

        // Optimize
        Optimizer optimizer = new LoadOptimizer();
        optimizer.optimize(readFrom);


        try {
            optimizeAndRunQuery(storePlan);
        }
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.optimizer.streaming.LoadOptimizer.optimize()

                                                              func,
                                                              pigContext);

        // Optimize
        Optimizer optimizer = new LoadOptimizer();
        optimizer.optimize(readFrom);


        try {
            optimizeAndRunQuery(storePlan);
        }
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.optimizer.streaming.StoreOptimizer.optimize()

        // Optimize the LogicalPlan
        Optimizer loadOptimizer = new LoadOptimizer();
        loadOptimizer.optimize(root);

        Optimizer storeOptimizer = new StoreOptimizer();
        storeOptimizer.optimize(root);

        // Execute
        ExecPhysicalPlan pp =
            pigContext.getExecutionEngine().compile(root, null);
View Full Code Here

Examples of org.apache.pig.newplan.logical.optimizer.LogicalPlanOptimizer.optimize()

          lp.connect(C, D);
        }
       
        System.out.println(lp);
        LogicalPlanOptimizer optimizer = new LogicalPlanOptimizer(lp, 500, null);
        optimizer.optimize();
       
        LogicalPlan expected = new LogicalPlan();
        {
            // A = load
          LogicalSchema aschema = new LogicalSchema();
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalPlan.optimize()

    }

    public static PhysicalPlan buildPp(PigServer pigServer, String query)
    throws Exception {
        LogicalPlan lp = buildLp( pigServer, query );
        lp.optimize(pigServer.getPigContext());
        return ((HExecutionEngine)pigServer.getPigContext().getExecutionEngine()).compile(lp,
                pigServer.getPigContext().getProperties());
    }

    public static LogicalPlan parse(String query, PigContext pc) throws FrontendException {
View Full Code Here

Examples of org.apache.pig.newplan.optimizer.PlanOptimizer.optimize()

    }

    private LogicalPlan migrateAndOptimizePlan(org.apache.pig.impl.logicalLayer.LogicalPlan plan) throws FrontendException {
        LogicalPlan newLogicalPlan = migratePlan( plan );
        PlanOptimizer optimizer = new MyPlanOptimizer( newLogicalPlan, 3 );
        optimizer.optimize();
        return newLogicalPlan;
    }
   
    private LogicalPlan migratePlan(org.apache.pig.impl.logicalLayer.LogicalPlan lp) throws VisitorException{
        LogicalPlanMigrationVistor visitor = new LogicalPlanMigrationVistor(lp);       
View Full Code Here

Examples of org.apache.pig.pen.util.FunctionalLogicalOptimizer.optimize()

                    plan, pigContext);
            validator.validate(plan, collector);

            FunctionalLogicalOptimizer optimizer = new FunctionalLogicalOptimizer(
                    plan);
            optimizer.optimize();
        } catch (FrontendException fe) {
            // Need to go through and see what the collector has in it. But
            // remember what we've caught so we can wrap it into what we
            // throw.
            caught = fe;
View Full Code Here

Examples of org.apache.pig.test.TestExperimentalFilterAboveForeach.MyPlanOptimizer.optimize()

           
            // Run the optimizer
            MyPlanOptimizer optimizer = new MyPlanOptimizer(newPlan, ls, 3);
            optimizer.addPlanTransformListener(new ProjectionPatcher());
            optimizer.addPlanTransformListener(new SchemaPatcher());
            optimizer.optimize();
           
            return newPlan;
        }catch(Exception e) {
            throw new VisitorException(e);
        }
View Full Code Here

Examples of org.apache.pig.test.TestLogicalOptimizer.LogicalOptimizerDerivative.optimize()

    public void testOpLimitOptimizerCheck() throws Exception {
        planTester.buildPlan("A = load 'myfile';");
        planTester.buildPlan("B = foreach A generate $0;");
        org.apache.pig.impl.logicalLayer.LogicalPlan plan = planTester.buildPlan("C = limit B 100;");
        LogicalOptimizerDerivative optimizer = new LogicalOptimizerDerivative(plan);
        int numIterations = optimizer.optimize();
        Assert.assertFalse("Checking number of iterations of the optimizer [actual = "
                + numIterations + ", expected < " + optimizer.getMaxIterations() +
                "]", optimizer.getMaxIterations() == numIterations);
   
    }
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.optimize()

        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_COMMIT)) {
            serverToUse.commit();
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_ROLLBACK)) {
            serverToUse.rollback();
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_OPTIMIZE)) {
            serverToUse.optimize();
        } else {
            throw new IllegalArgumentException(SolrConstants.OPERATION + " header value '" + operation + "' is not supported");
        }
    }
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.