Package org.voltdb

Examples of org.voltdb.CatalogContext


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

        // Fire off a distributed neworder txn
        // It should always come back with zero restarts
View Full Code Here


        deleteTestFiles();
        setUpSnapshotDir();

        VoltTable results[] = null;
        Client client = this.getClient();
        CatalogContext cc = this.getCatalogContext();      
       
        // Load database
        try {
            //initializeYCSBDatabase(cc, client, YCSBConstants.NUM_RECORDS);
            initializeYCSBDatabase(cc, client, 10000);
View Full Code Here

        int ctr = 0;
        Iterator<LogEntry> log_itr = reader.iterator();
        ClientResponse cresponse = null;
        Client client = this.getClient();
        CatalogContext cc = this.getCatalogContext();
        VoltTable results[] = null;

        while (log_itr.hasNext()) {
            LogEntry entry = log_itr.next();

            assert(entry != null);
            //System.err.println("REDO :: TXN ID :" + entry.getTransactionId().longValue());
            //System.err.println("REDO :: PROC ID :" + entry.getProcedureId());

            Object[] entryParams = entry.getProcedureParams().toArray();
       
            String procName = cc.getProcedureById(entry.getProcedureId()).fullName();
            Procedure catalog_proc = cc.procedures.getIgnoreCase(procName);

            if(catalog_proc.getReadonly() == false){
                // System.out.println("Invoking procedure ::" + procName);
View Full Code Here

    }
   
    public void testTABLECOUNTS() throws IOException, ProcCallException {
        Client client = getClient();
        ClientResponse cr = null;
        CatalogContext catalogContext = this.getCatalogContext();
       
        Random rand = this.getRandom();
        int num_tuples = 11;
        for (Table catalog_tbl : catalogContext.database.getTables()) {
            RegressionSuiteUtil.loadRandomData(client, catalog_tbl, rand, num_tuples);
View Full Code Here

    }
   
    private Map<Integer, VoltTable> evictData(Client client) throws Exception {
//        System.err.printf("Evicting data...");
        String procName = VoltSystemProcedure.procCallName(EvictTuples.class);
        CatalogContext catalogContext = this.getCatalogContext();
        String tableNames[] = { VoterConstants.TABLENAME_VOTES };
        LatchableProcedureCallback callback = new LatchableProcedureCallback(catalogContext.numberOfPartitions);
//        long evictBytes[] = { Integer.MAX_VALUE };
        long evictBytes[] = {10000};
        int numBlocks[] = { 1 };
        for (int partition : catalogContext.getAllPartitionIds()) {
//            System.err.printf("Evicting data at partition %d...\n", partition);
          String children[] = null;
            Object params[] = { partition, tableNames, children, evictBytes, numBlocks };
            boolean result = client.callProcedure(callback, procName, params);
            assertTrue(result);
View Full Code Here

    /**
     * testEvictHistory
     */
    public void testEvictHistory() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        this.initializeDatabase(client);
        this.loadVotes(client, 100);
        int num_evicts = 5;
        for (int i = 0; i < num_evicts; i++) {
View Full Code Here

    /**
     * testValidateDatabase
     */
    public void testValidateDatabase() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        RegressionSuiteUtil.initializeTPCCDatabase(catalogContext, client, true);
       
        String procName = VoltSystemProcedure.procCallName(AdHoc.class);
        String sql = "SELECT MIN(I_ID), MAX(I_ID) FROM " + TPCCConstants.TABLENAME_ITEM;
View Full Code Here

   
    /**
     * testEarlyPrepare
     */
    public void testEarlyPrepare() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        RegressionSuiteUtil.initializeTPCCDatabase(catalogContext, client, true);
       
        String procName = neworder.class.getSimpleName();
        Object params[] = RegressionSuiteUtil.generateNewOrder(catalogContext.numberOfPartitions, true, WAREHOUSE_ID, DISTRICT_ID);
View Full Code Here

   
    /**
     * testRemoteQueryEstimates
     */
    public void testRemoteQueryEstimates() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        RegressionSuiteUtil.initializeTPCCDatabase(catalogContext, client, true);

        // We have to turn off caching to ensure that we get a full path estimate each time
        RegressionSuiteUtil.setHStoreConf(client, "site.markov_path_caching", false);
View Full Code Here

   
    /**
     * testRemoteIdle
     */
    public void testRemoteIdle() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        RegressionSuiteUtil.initializeTPCCDatabase(catalogContext, client, true);
       
        ClientResponse cresponse = null;
        String procName = null;
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.