Package org.voltdb.catalog

Examples of org.voltdb.catalog.Partition


    protected final VoltTable[] executeOncePerSite(final int distributeId, final int aggregateId, final ParameterSet params) {
        final SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[catalogContext.numberOfSites + 1];
       
        int i = 0;
        for (Site catalog_site : catalogContext.sites.values()) {
            Partition catalog_part = null;
            int first_id = Integer.MAX_VALUE;
            for (Partition p : catalog_site.getPartitions().values()) {
                if (catalog_part == null || p.getId() < first_id) {
                    catalog_part = p;
                    first_id = p.getId();
                }
            } // FOR
            assert(catalog_part != null) : "No partitions for " + catalog_site;

            if (debug.val)
                LOG.debug(String.format("Creating PlanFragment #%d for %s on %s",
                          distributeId, catalog_part, catalog_site));
            pfs[i] = new SynthesizedPlanFragment();
            pfs[i].fragmentId = distributeId;
            pfs[i].inputDependencyIds = new int[] { };
            pfs[i].outputDependencyIds = new int[] { distributeId };
            pfs[i].multipartition = true;
            pfs[i].nonExecSites = false;
            pfs[i].destPartitionId = catalog_part.getId();
            pfs[i].parameters = params;
            pfs[i].last_task = (catalog_site.getId() != hstore_site.getSiteId());
            i += 1;
        } // FOR
View Full Code Here


            batch[i] = new SQLStmt(this.catalog_stmt, this.catalog_stmt.getMs_fragments());
            args[i] = VoltProcedure.getCleanParams(batch[i], raw_args);
            stmtCounters[i] = i;
        } // FOR
       
        Partition catalog_part = catalogContext.getPartitionById(LOCAL_PARTITION);
        hstore_site = HStore.initialize(catalogContext, ((Site)catalog_part.getParent()).getId(), HStoreConf.singleton());
        hstore_site.addPartitionExecutor(LOCAL_PARTITION, executor);
        this.depTracker = hstore_site.getDependencyTracker(LOCAL_PARTITION);
        this.depTrackerDbg = this.depTracker.getDebugContext();
       
        BatchPlanner batchPlan = new BatchPlanner(batch, catalog_proc, p_estimator);
View Full Code Here

            this.batch[i] = new SQLStmt(catalog_stmt, catalog_stmt.getMs_fragments());
            this.params[i] = VoltProcedure.getCleanParams(batch[i], raw_args);
            this.stmtCounters[i] = i;
        } // FOR
    
        Partition catalog_part = catalogContext.getPartitionById(LOCAL_PARTITION);
        assertNotNull(catalog_part);
        this.hstore_site = HStore.initialize(catalogContext, ((Site)catalog_part.getParent()).getId(), HStoreConf.singleton());
        this.hstore_site.addPartitionExecutor(LOCAL_PARTITION, executor);
        this.depTracker = hstore_site.getDependencyTracker(LOCAL_PARTITION);
        this.depTrackerDbg = this.depTracker.getDebugContext();
       
        BatchPlanner planner = new BatchPlanner(batch, catalog_proc, p_estimator);
View Full Code Here

TOP

Related Classes of org.voltdb.catalog.Partition

Copyright © 2018 www.massapicom. 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.