Examples of BatchPlan


Examples of edu.brown.hstore.BatchPlanner.BatchPlan

        this.planner = new BatchPlanner(this.batch, this.catalog_proc, p_estimator);
    }
   
    private BatchPlan getPlan() {
        this.touched_partitions.clear();
        BatchPlan plan = planner.plan(
                            TXN_ID,
                            0,
                            catalogContext.getAllPartitionIds(),
                            this.touched_partitions,
                            this.args);
        assertNotNull(plan);
        assertFalse(plan.hasMisprediction());
        return (plan);
    }
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

        this.args = new ParameterSet[]{ new ParameterSet(params) };
       
        BatchPlanner planner = new BatchPlanner(batch, catalog_proc, p_estimator);
        this.touched_partitions.clear();
        PartitionSet partitions = catalogContext.getPartitionSetSingleton(BASE_PARTITION);
        BatchPlan plan = planner.plan(TXN_ID,
                                      BASE_PARTITION,
                                      partitions,
                                      this.touched_partitions,
                                      this.args);
        assertNotNull(plan);
        assertTrue(plan.hasMisprediction());
        MispredictionException error = plan.getMisprediction();
        assertTrue(error.getPartitions().values().containsAll(catalogContext.getAllPartitionIds()));
    }
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

        for (Statement catalog_stmt : catalog_proc.getStatements()) {
            this.batch[0] = new SQLStmt(catalog_stmt);
            this.args[0] = new ParameterSet(this.randomStatementParameters(catalog_stmt));
            this.planner = new BatchPlanner(this.batch, this.catalog_proc, p_estimator);
            this.touched_partitions.clear();
            BatchPlan plan = this.getPlan();
       
            List<WorkFragment.Builder> builders = new ArrayList<WorkFragment.Builder>();
            plan.getWorkFragmentsBuilders(TXN_ID, stmtCounters, builders);
            assertFalse(builders.isEmpty());
       
            for (WorkFragment.Builder builder : builders) {
                assertNotNull(builder);
                for (int frag_id : builder.getFragmentIdList()) {
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

            stmtCounters[i] = i;
        } // FOR
       
        BatchPlanner planner = new BatchPlanner(batch, catalog_proc, p_estimator);
        this.touched_partitions.clear();
        BatchPlan plan = planner.plan(TXN_ID,
                                      BASE_PARTITION,
                                      catalogContext.getAllPartitionIds(),
                                      this.touched_partitions,
                                      params);
        assertNotNull(plan);
        assertFalse(plan.hasMisprediction());
       
        List<WorkFragment.Builder> builders = new ArrayList<WorkFragment.Builder>();
        plan.getWorkFragmentsBuilders(TXN_ID, stmtCounters, builders);
        assertFalse(builders.isEmpty());

        List<Statement> batchStmtOrder = new ArrayList<Statement>();
        boolean first = true;
        Statement last = null;
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

    /**
     * testBuildWorkFragments
     */
    public void testBuildWorkFragments() throws Exception {
        List<WorkFragment.Builder> builders = new ArrayList<WorkFragment.Builder>();
        BatchPlan plan = this.getPlan();
        plan.getWorkFragmentsBuilders(TXN_ID, this.stmtCounters, builders);
        assertFalse(builders.isEmpty());
       
        for (WorkFragment.Builder builder : builders) {
            assertNotNull(builder);
//            System.err.println(pf);
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

                throw new RuntimeException("Failed to serialize ParameterSet " + i + " for " + ts, ex);
            }
        } // FOR (Statement)

        // Generate the WorkFragments that we will need to send in our TransactionInitRequest
        BatchPlan plan = planner.plan(ts.getTransactionId(),
                                      basePartition,
                                      ts.getPredictTouchedPartitions(),
                                      ts.getTouchedPartitions(),
                                      prefetchParams);
        List<WorkFragment.Builder> fragmentBuilders = new ArrayList<WorkFragment.Builder>();
        plan.getWorkFragmentsBuilders(ts.getTransactionId(), prefetchCounters, fragmentBuilders);
       
        // Loop through the fragments and check whether at least one of
        // them needs to be executed at the base (local) partition. If so, we need a
        // separate TransactionInitRequest per site. Group the WorkFragments by siteID.
        // If we have a prefetchable query for the base partition, it means that
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

            }
        } // FOR
       
        this.ts.initFirstRound(undoToken, nextBatch.length);
        BatchPlanner nextPlanner = new BatchPlanner(nextBatch, this.catalog_proc, p_estimator);
        BatchPlan nextPlan = nextPlanner.plan(TXN_ID,
                                              BASE_PARTITION,
                                              catalogContext.getAllPartitionIds(),
                                              this.touchedPartitions,
                                              nextParams);
        List<WorkFragment.Builder> ftasks = new ArrayList<WorkFragment.Builder>();
        nextPlan.getWorkFragmentsBuilders(TXN_ID, nextCounters, ftasks);
        for (WorkFragment.Builder fragment : ftasks) {
            this.depTracker.addWorkFragment(this.ts, fragment, nextParams);
        } // FOR
       
        this.ts.startRound(BASE_PARTITION);
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

                nextResults[0] = CatalogUtil.getVoltTable(outputCols);
            }
            this.ts.initFirstRound(undoToken, nextBatch.length);
           
            BatchPlanner nextPlanner = new BatchPlanner(nextBatch, this.catalog_proc, p_estimator);
            BatchPlan nextPlan = nextPlanner.plan(TXN_ID,
                                                  BASE_PARTITION,
                                                  catalogContext.getAllPartitionIds(),
                                                  this.touchedPartitions,
                                                  nextParams);
            List<WorkFragment.Builder> ftasks = new ArrayList<WorkFragment.Builder>();
            nextPlan.getWorkFragmentsBuilders(TXN_ID, nextCounters, ftasks);
            for (WorkFragment.Builder fragment : ftasks) {
                this.depTracker.addWorkFragment(this.ts, fragment, nextParams);
            } // FOR
            this.ts.startRound(BASE_PARTITION);
           
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

        assertEquals(AbstractTransaction.RoundState.INITIALIZED, this.ts.getCurrentRoundState(BASE_PARTITION));
        assertNotNull(this.ts.getLastUndoToken(BASE_PARTITION));
        assertEquals(undoToken, this.ts.getLastUndoToken(BASE_PARTITION));
       
        BatchPlanner nextPlanner = new BatchPlanner(nextBatch, this.catalog_proc, p_estimator);
        BatchPlan nextPlan = nextPlanner.plan(TXN_ID,
                                              BASE_PARTITION,
                                              catalogContext.getAllPartitionIds(),
                                              this.touchedPartitions,
                                              nextParams);
        List<WorkFragment.Builder> ftasks = new ArrayList<WorkFragment.Builder>();
        nextPlan.getWorkFragmentsBuilders(TXN_ID, nextCounters, ftasks);
        assertEquals(1, ftasks.size());
        WorkFragment.Builder fragment = CollectionUtil.first(ftasks);
        this.depTracker.addWorkFragment(this.ts, fragment, nextParams);
       
        // We only need to add the query result for the first query
View Full Code Here

Examples of edu.brown.hstore.BatchPlanner.BatchPlan

        assertEquals(AbstractTransaction.RoundState.INITIALIZED, this.ts.getCurrentRoundState(BASE_PARTITION));
        assertNotNull(this.ts.getLastUndoToken(BASE_PARTITION));
        assertEquals(undoToken, this.ts.getLastUndoToken(BASE_PARTITION));
       
        BatchPlanner nextPlanner = new BatchPlanner(nextBatch, this.catalog_proc, p_estimator);
        BatchPlan nextPlan = nextPlanner.plan(TXN_ID,
                                              BASE_PARTITION,
                                              catalogContext.getAllPartitionIds(),
                                              this.touchedPartitions,
                                              nextParams);
        List<WorkFragment.Builder> ftasks = new ArrayList<WorkFragment.Builder>();
        nextPlan.getWorkFragmentsBuilders(TXN_ID, nextCounters, ftasks);
        for (WorkFragment.Builder fragment : ftasks) {
            this.depTracker.addWorkFragment(this.ts, fragment, nextParams);
        } // FOR
       
        // We only need to add the query result for the first query
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.