Package org.voltdb

Examples of org.voltdb.CatalogContext


        System.out.println("Starting testYCSB - Physical Recovery");               
      
        VoltTable results[] = null;
        ClientResponse cresponse = 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


        // In a single query batch we will first execute an update on a replicated
        // table and then execute a second query that will read from that table. The
        // second query should get the new value from the first query and not the
        // original value.
        Client client = this.getClient();
        CatalogContext catalogContext = this.getCatalogContext();
        Table catalog_tbl = catalogContext.getTableByName(TPCCConstants.TABLENAME_ITEM);
        assertTrue(catalog_tbl.getIsreplicated());
        int expectedNumItems = 10;
        VoltTable vt = CatalogUtil.getVoltTable(catalog_tbl);
        for (int i = 0; i < expectedNumItems; i++) {
            Object row[] = VoltTableUtil.getRandomRow(catalog_tbl);
View Full Code Here

            "NOCONNECTIONS=true",
            "BENCHMARK.FIXED_SIZE=true",
            "BENCHMARK.NUM_RECORDS="+num_tuples,
            "BENCHMARK.LOADTHREADS=1",
        };
        final CatalogContext catalogContext = this.getCatalogContext();
        UsersLoader loader = new UsersLoader(args) {
            {
                this.setCatalogContext(catalogContext);
                this.setClientHandle(client);
            }
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[] = { UsersConstants.TABLENAME_USERS };
      LatchableProcedureCallback callback = new LatchableProcedureCallback(1);
//      long evictBytes[] = { Integer.MAX_VALUE };
      long evictBytes[] = {1024 * 10};
      int numBlocks[] = { 1 };
     
      int remote_partition = catalogContext.getAllPartitionIdArray()[1];
      System.out.printf("Evicting data at partition %d...\n", remote_partition);
      String children[] = null;
          Object params[] = { remote_partition, tableNames, children, evictBytes, numBlocks };
          boolean result = client.callProcedure(callback, procName, params);
          assertTrue(result);
View Full Code Here

        deleteTestFiles();
        setUpSnapshotDir();

        VoltTable results[] = null;
        Client client = this.getClient();
        CatalogContext cc = this.getCatalogContext();      
       
        // Load database
        try {
            initializeTPCCDatabase(cc, client, false);
        } catch (Exception e) {
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

     * testPrefetch
     * @throws Exception
     */
    @Test
    public void testPrefetch() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        TestSmallBankSuite.initializeSmallBankDatabase(catalogContext, client);
       
        // Check to make sure that we have some prefetch queries
        Procedure catalog_proc = catalogContext.procedures.getIgnoreCase(SendPayment.class.getSimpleName());
View Full Code Here

    /**
     * testSendPayment
     */
    public void testSendPayment() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        TestSmallBankSuite.initializeSmallBankDatabase(catalogContext, client);
        long acctIds[] = { 1l, 2l };
        double balances[] = { 100d, 0d };
        ClientResponse cresponse;
        VoltTable results[];

        Table catalog_tbl = catalogContext.getTableByName(SmallBankConstants.TABLENAME_ACCOUNTS);
        long num_rows = RegressionSuiteUtil.getRowCount(client, catalog_tbl);
        assert(num_rows > acctIds[acctIds.length-1]);
        // System.err.println("# of Rows: " + num_rows);
       
        for (int i = 0; i < acctIds.length; i++) {
View Full Code Here

   
    /**
     * testSendPaymentInsufficientFunds
     */
    public void testSendPaymentInsufficientFunds() throws Exception {
        CatalogContext catalogContext = this.getCatalogContext();
        Client client = this.getClient();
        TestSmallBankSuite.initializeSmallBankDatabase(catalogContext, client);
       
        long acctIds[] = { 1l, 2l };
        double balances[] = { 0d, 100d };
View Full Code Here

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

        // Enable the feature on the server
        RegressionSuiteUtil.setHStoreConf(client, "site.markov_path_caching", true);
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.