Examples of callProcedure()


Examples of org.voltdb.client.Client.callProcedure()

        Client client = getClient();
        loadF(client, 0);

        String qs = "select sum(F_VAL1), sum(F_VAL2), sum(F_VAL3) from F";

        vt = client.callProcedure("@AdHoc", qs).getResults()[0];
        System.out.println("testDistributedSum result: " + vt);
        assertTrue(vt.getRowCount() == 1);
        while (vt.advanceRow()) {
            Integer sum1 = (Integer) vt.get(0, VoltType.INTEGER);
            assertEquals(2000, sum1.intValue());
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

        loadF(client, 0);

        // FIXME String qs = "select sum(V.SUM_v1), sum(V.SUM_V2), sum(V.SUM_V3) from V";
        String qs = "select sum(V.SUM_v1), sum(V.SUM_V2) from V";

        vt = client.callProcedure("@AdHoc", qs).getResults()[0];
        System.out.println("testDistributedSum_View result: " + vt);
        assertTrue(vt.getRowCount() == 1);
        while (vt.advanceRow()) {
            Integer sum1 = (Integer) vt.get(0, VoltType.INTEGER);
            assertEquals(2000, sum1.intValue());
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

//            + "from V group by V.V_D1_PKEY";
        String qs = "select V.V_D1_PKEY, sum(V.SUM_V1), sum(V.SUM_V2) "
                + "from V group by V.V_D1_PKEY";
       

        vt = client.callProcedure("@AdHoc", qs).getResults()[0];
        System.out.println("testDistributedSumAndJoin result: " + vt);
        assert (vt.getRowCount() == 10); // 10 unique values for dim1 which is
        // the grouping col

        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

            if (k_itr % period == 0)
                System.out.println(String.format("Transactions Processed: %6d / %d", k_itr, numTransactions));
        }           
               
        // Statistics
        results = client.callProcedure("@Statistics", "table", 0).getResults();
        System.out.println("@Statistics before RESTART :");              
        System.out.println(results[0]);       
       
        // Kill and restart all the execution sites.
        m_config.shutDown();
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

        // Kill and restart all the execution sites.
        m_config.shutDown();
        m_config.startUp();
        client = getClient();       

        results = client.callProcedure("@Statistics", "table", 0).getResults();
        System.out.println("@Statistics after PHYSICAL restore :");
        System.out.println(results[0]);     
       
    }
   
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

       
        Client client = this.getClient();
        String procName = VoltSystemProcedure.procCallName(AdHoc.class);
        ClientResponse cr;
       
        cr = client.callProcedure(procName, "INSERT INTO NEW_ORDER VALUES (1, 1, 1);");
        VoltTable modCount = cr.getResults()[0];
        assertTrue(modCount.getRowCount() == 1);
        assertTrue(modCount.asScalarLong() == 1);

        cr = client.callProcedure(procName, "SELECT * FROM NEW_ORDER;");
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

        cr = client.callProcedure(procName, "INSERT INTO NEW_ORDER VALUES (1, 1, 1);");
        VoltTable modCount = cr.getResults()[0];
        assertTrue(modCount.getRowCount() == 1);
        assertTrue(modCount.asScalarLong() == 1);

        cr = client.callProcedure(procName, "SELECT * FROM NEW_ORDER;");
        VoltTable result = cr.getResults()[0];
        assertTrue(result.getRowCount() == 1);
        // System.out.println(result.toString());

        boolean caught = false;
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

        assertTrue(result.getRowCount() == 1);
        // System.out.println(result.toString());

        boolean caught = false;
        try {
            client.callProcedure("@AdHoc", "SLEECT * FROOM NEEEW_OOORDERERER;");
        } catch (Exception e) {
            caught = true;
        }
        assertTrue("Bad SQL failed to throw expected exception", caught);
    }
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

        for (int i = 0; i < 100; i++) {
            for (int p = 0; p < catalogContext.numberOfPartitions; p++) {
                hints.basePartition = p;
               
                // Once with a callback
                client.callProcedure(callbacks[p], "GetItem", hints, 1);
               
                // And once without a callback
                ClientResponse cresponse = client.callProcedure("GetItem", hints, 1);
                assertNotNull(cresponse);
                assertEquals(Status.OK, cresponse.getStatus());
View Full Code Here

Examples of org.voltdb.client.Client.callProcedure()

               
                // Once with a callback
                client.callProcedure(callbacks[p], "GetItem", hints, 1);
               
                // And once without a callback
                ClientResponse cresponse = client.callProcedure("GetItem", hints, 1);
                assertNotNull(cresponse);
                assertEquals(Status.OK, cresponse.getStatus());
                assertEquals(p, cresponse.getBasePartition());
            } // FOR
        } // FOR
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.