Package org.voltdb

Examples of org.voltdb.CatalogContext


    /**
     * testSaveLoadProfile
     */
    public void testSaveLoadProfile() throws Exception {
        Client client = this.getClient();
        CatalogContext catalogContext = this.getCatalogContext();
        SEATSLoader loader = this.initializeSEATSDatabase(catalogContext, client);
       
        SEATSProfile orig = loader.getProfile();
        assertNotNull(orig);
       
View Full Code Here


    /**
     * testFindOpenSeats
     */
    public void testFindOpenSeats() throws Exception {
        Client client = this.getClient();
        CatalogContext catalogContext = this.getCatalogContext();
        this.initializeSEATSDatabase(catalogContext, client);
        SEATSClient benchmarkClient = this.initializeSEATSClient(catalogContext, client);
        assertNotNull(benchmarkClient);
    
        Transaction txn = Transaction.FIND_OPEN_SEATS;
View Full Code Here

    /**
     * testNewReservation
     */
    public void testNewReservation() throws Exception {
        Client client = this.getClient();
        CatalogContext catalogContext = this.getCatalogContext();
        this.initializeSEATSDatabase(catalogContext, client);

        ClientResponse cresponse;
        String sql;
       
View Full Code Here

        assertNotNull(xact_trace);

        // Change the catalog so that the data from the tables are in different partitions
        Database clone_db = CatalogCloner.cloneDatabase(catalogContext.database);
        assertNotNull(clone_db);
        CatalogContext clone_catalogContext = new CatalogContext(clone_db.getCatalog());
        Table catalog_tbl = clone_db.getTables().get(TM1Constants.TABLENAME_CALL_FORWARDING);
        assertNotNull(catalog_tbl);
        Column catalog_col = catalog_tbl.getColumns().get("START_TIME");
        assertNotNull(catalog_col);
        catalog_tbl.setPartitioncolumn(catalog_col);
View Full Code Here

        // So here we want to throw a txn at the cost model first without a partitioning ProcParameter
        // and then with one. We should see that the TransactionCacheEntry gets updated properly
        // and that the txn becomes multi-sited
        Database clone_db = CatalogCloner.cloneDatabase(catalogContext.database);
        assertNotNull(clone_db);
        CatalogContext clone_catalogContext = new CatalogContext(clone_db.getCatalog());
       
        Procedure catalog_proc = this.getProcedure(clone_db, GetAccessData.class);
        TransactionTrace target_txn = null;
        for (TransactionTrace txn : workload.getTransactions()) {
            if (txn.getCatalogItemName().equals(catalog_proc.getName())) {
View Full Code Here

    /**
     * testMultiColumnPartitioning
     */
    public void testMultiColumnPartitioning() throws Exception {
        Database clone_db = CatalogCloner.cloneDatabase(catalogContext.database);
        CatalogContext clone_catalogContext = new CatalogContext(clone_db.getCatalog());
        Procedure catalog_proc = this.getProcedure(clone_db, GetAccessData.class);
        TransactionTrace target_txn = null;
        for (TransactionTrace txn : workload.getTransactions()) {
            if (txn.getCatalogItemName().equals(catalog_proc.getName())) {
                target_txn = txn;
View Full Code Here

   
    static LocalTransaction makeLocalTransaction(HStoreSite hstore_site) {
        long txnId = hstore_site.getTransactionIdManager(0).getNextUniqueTransactionId();
        long clientHandle = -1;
       
        CatalogContext catalogContext = hstore_site.getCatalogContext();
        int base_partition = CollectionUtil.random(hstore_site.getLocalPartitionIds());
        PartitionSet predict_touchedPartitions = catalogContext.getAllPartitionIds();
        boolean predict_readOnly = false;
        boolean predict_canAbort = true;
        Procedure catalog_proc = catalogContext.procedures.getIgnoreCase("@NoOp");
        ParameterSet params = new ParameterSet();
        RpcCallback<ClientResponseImpl> client_callback = null;
View Full Code Here

   
    static RemoteTransaction makeDistributedTransaction(HStoreSite base_hstore_site, HStoreSite remote_hstore_site) {
        long txnId = base_hstore_site.getTransactionIdManager(0).getNextUniqueTransactionId();
        long clientHandle = -1;
       
        CatalogContext catalogContext = base_hstore_site.getCatalogContext();
        int base_partition = CollectionUtil.random(base_hstore_site.getLocalPartitionIds());
        PartitionSet predict_touchedPartitions = catalogContext.getAllPartitionIds();
        int partition = CollectionUtil.random(remote_hstore_site.getLocalPartitionIds());
        predict_touchedPartitions.add(partition);
        boolean predict_readOnly = false;
        boolean predict_canAbort = true;
        Procedure catalog_proc = catalogContext.procedures.getIgnoreCase("@NoOp");
View Full Code Here

        m_hstoreConf = HStoreConf.singleton(true);

        if (catalog != null && m_hstoreConf.client.txn_hints) {
            m_catalog = catalog;
            m_catalogContext = new CatalogContext(m_catalog);
            m_pEstimator = new PartitionEstimator(m_catalogContext);
            m_partitionSiteXref = CatalogUtil.getPartitionSiteXrefArray(m_catalog);
    }

        m_distributer = new Distributer(
View Full Code Here

       
        this.rng = new DefaultRandomGenerator();
        this.profile = new SEATSProfile(this.getCatalogContext(), this.rng);
        this.profile.scale_factor = this.getScaleFactor();
       
        CatalogContext catalogContext = this.getCatalogContext();
        int table_ctr = 0;
        for (Table catalog_tbl : catalogContext.getDataTables()) {
            if (catalog_tbl.getName().startsWith("CONFIG_") == false) {
                table_ctr++;
            }
        } // FOR
        this.num_data_tables = table_ctr;
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.