Package org.voltdb

Examples of org.voltdb.CatalogContext


     */
    public void testMultiAttributePartitioning() throws Exception {
        // This checks that the ProcParameters and the StmtParameters get mapped to
        // the same partition for a multi-attribute partitioned Procedure+Table
        Database clone_db = CatalogCloner.cloneDatabase(catalogContext.database);
        CatalogContext clone_catalogContext = new CatalogContext(clone_db.getCatalog());
        PartitionEstimator p_estimator = new PartitionEstimator(clone_catalogContext);

        // Procedure
        Procedure catalog_proc = this.getProcedure(clone_db, paymentByCustomerId.class);
        ProcParameter catalog_params[] = new ProcParameter[] {
View Full Code Here


    public TPCCLoader(String args[]) {
        super(args);

        initTableNames();
       
        CatalogContext catalogContext = this.getCatalogContext();
        m_tpccConfig = TPCCConfig.createConfig(catalogContext, m_extraParams);
        m_loadThreads = new LoadThread[m_tpccConfig.num_loadthreads];
       
        // Scale the MAX_BATCH_SIZE based on the number of partitions
        this.replicated_batch_size = MAX_BATCH_SIZE / catalogContext.numberOfPartitions;
View Full Code Here

        else
            msg += "<p>Hello, " + parms.getProperty("username") + "!</p>";

        msg += "</body></html>\n";*/

        CatalogContext context = VoltDB.instance().getCatalogContext();

        // just print voltdb version for now
        String msg = "<html><body>\n";
        msg += "<h2>VoltDB Version " + VoltDB.instance().getVersionString() + "</h2>\n";
        msg += "<p><b>Buildstring:</b> " + VoltDB.instance().getBuildString() + "</p>\n";
View Full Code Here

        }
    }

    public void updateCatalog(Catalog catalog, File catalog_path) {
        this.catalog = catalog;
        this.catalogContext = new CatalogContext(catalog, catalog_path);
        this.catalog_db = CatalogUtil.getDatabase(catalog);
        if (catalog_path != null)
            this.catalog_path = catalog_path;
    }
View Full Code Here

                        new_catalog_tbl.setPartitioncolumn(new_catalog_col);
                    }
                } // FOR
                Database new_catalog_db = CatalogUtil.getDatabase(new_catalog);
                CatalogCloner.cloneConstraints(info.catalogContext.database, new_catalog_db);
                CatalogContext newCatalogContext = new CatalogContext(new_catalog);

                double cost = 0d;
                try {
                    cost_model.estimateWorkloadCost(newCatalogContext, info.workload, filter, null);
                } catch (Exception ex) {
View Full Code Here

        m_tableTuples.put(tableName, rowCount);
        m_tableBytes.put(tableName, byteCount);
       
        // Keep track of table stats
        if (m_tableStats && cr.getStatus() == Status.OK) {
            final CatalogContext catalogContext = this.getCatalogContext();
            assert(catalogContext != null);
            final Table catalog_tbl = catalogContext.getTableByName(tableName);
            assert(catalog_tbl != null) : "Invalid table name '" + tableName + "'";
           
            synchronized (m_tableStatsData) {
                TableStatistics stats = m_tableStatsData.get(catalog_tbl);
                if (stats == null) {
View Full Code Here

     * were collected using loadVoltTable()
     * @return
     */
    private final WorkloadStatistics generateWorkloadStatistics() {
        assert(m_tableStatsDir != null);
        final CatalogContext catalogContext = this.getCatalogContext();
        assert(catalogContext != null);

        // Make sure we call postprocess on all of our friends
        for (TableStatistics tableStats : m_tableStatsData.values()) {
            try {
View Full Code Here

    }
    public void setCatalogContext(CatalogContext catalogContext) {
        m_catalogContext = catalogContext;
    }
    public void applyPartitionPlan(File partitionPlanPath) {
        CatalogContext catalogContext = this.getCatalogContext();
        BenchmarkComponent.applyPartitionPlan(catalogContext.database, partitionPlanPath);
    }
View Full Code Here

        boolean noExecute = false;
        boolean noShutdown = false;
       
        boolean killOnZeroResults = false;
       
        CatalogContext catalogContext = null;
       
        // HStoreConf Path
        File hstore_conf_path = null;
       
        // Benchmark Conf Path
View Full Code Here

     * new CatalogContext object from it
     * @param jar_path
     */
    public static CatalogContext loadCatalogContextFromJar(File jar_path) {
        Catalog catalog = CatalogUtil.loadCatalogFromJar(jar_path);
        return new CatalogContext(catalog, jar_path);
    }
View Full Code Here

TOP

Related Classes of org.voltdb.CatalogContext

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.