Examples of callProcedure()


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

        // connect to VoltDB server
        Client client = ClientFactory.createClient();
        client.createConnection(null, args.getParam(ArgumentsParser.PARAM_CATALOG_HOSTS), HStoreConstants.DEFAULT_PORT, "user", "password");

        // long w_id, String w_name, String w_street_1, String w_street_2, String w_city, String w_state, String w_zip, double w_tax, double w_ytd
        VoltTable[] result = client.callProcedure("InsertSubscriber", 1l, "0000001").getResults();
       
//        VoltTable[] result = client.callProcedure("InsertWarehouse",
//                0l,
//                "w_name",
//                "w_street_1",
View Full Code Here

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

                    b_ol_dist_info[batch_cnt] = generator.astring(TPCCConstants.DIST, TPCCConstants.DIST);
                    ++batch_cnt;
                    if (batch_cnt == BATCH_SIZE) {
                        total += BATCH_SIZE;
                        System.out.println ("loading: " + total + "/" + (parameters.districtsPerWarehouse * customersPerDistrictAfterInsertion * (TPCCConstants.MAX_OL_CNT - TPCCConstants.MIN_OL_CNT)));
                        client.callProcedure(InsertOrderLineBatched.class.getSimpleName(),
                            b_ol_o_id, b_ol_d_id, w_id, b_ol_number, b_ol_i_id,
                            b_ol_supply_w_id, b_ol_delivery_d, b_ol_quantity, b_ol_amount, b_ol_dist_info);
                        batch_cnt = 0;
                    }
                }
View Full Code Here

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

        System.out.println("created " + (System.currentTimeMillis() - tm) + "ms");
        tm = System.currentTimeMillis();

        //delete the 10% orderline
        client.callProcedure(ResetWarehouse.class.getSimpleName(),
                1L,
                (long) parameters.districtsPerWarehouse,
                (long) parameters.customersPerDistrict,
                (long) parameters.newOrdersPerDistrict);
        System.out.println("deleted " + (System.currentTimeMillis() - tm) + "ms");
View Full Code Here

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

        Client client = this.getClient();
        VoltTable vt;

        loaderNxN(client, 0);

        vt = client.callProcedure("@AdHoc", "Select * from T1").getResults()[0];
        System.out.println("T1-*:" + vt);

        // execute the query
        vt = client.callProcedure("@AdHoc", "SELECT A1 from T1 group by A1").getResults()[0];

View Full Code Here

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

        vt = client.callProcedure("@AdHoc", "Select * from T1").getResults()[0];
        System.out.println("T1-*:" + vt);

        // execute the query
        vt = client.callProcedure("@AdHoc", "SELECT A1 from T1 group by A1").getResults()[0];

        // one row per unique value of A1
        System.out.println("testSelectAGroubyA: " + vt);
        assertTrue(vt.getRowCount() == 11);

View Full Code Here

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

        Client client = this.getClient();
        VoltTable vt;

        loaderNxN(client, 0);

        vt = client.callProcedure("@AdHoc",
        "select count(A1) from T1 group by A1").getResults()[0];
        System.out.println("testSelectCountAGroupbyA result: " + vt);
        assertTrue(vt.getRowCount() == 11);

        // Selecting count(A1) - should get two counts of 1 and one count each
View Full Code Here

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

        Client client = this.getClient();
        loaderNxN(client, 0);

        String qs = "select A1, sum(A1) from T1 group by A1";

        vt = client.callProcedure("@AdHoc", qs).getResults()[0];
        System.out.println("testSelectSumAGroupbyA result: " + vt);
        assertEquals(11, vt.getRowCount());

        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        while (vt.advanceRow()) {
View Full Code Here

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

    /** select count(distinct A1) from T1 */
    public void testSelectCountDistinct() throws IOException, ProcCallException {
        VoltTable vt;
        Client client = getClient();
        loaderNxN(client, 0);
        vt = client
        .callProcedure("@AdHoc", "select count(distinct A1) from T1").getResults()[0];
        assertTrue(vt.getRowCount() == 1);

        // there are 11 distinct values for A1
        while (vt.advanceRow()) {
View Full Code Here

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

    /** select count(A1) from T1 */
    public void testSelectCount() throws IOException, ProcCallException {
        VoltTable vt;
        Client client = getClient();
        loaderNxN(client, 0);
        vt = client.callProcedure("@AdHoc", "select count(A1) from T1").getResults()[0];
        assertTrue(vt.getRowCount() == 1);

        // there are 56 rows in the table 1 + 2 + 3 + .. + 10 + 1
        while (vt.advanceRow()) {
            Integer A1 = (Integer) vt.get(0, VoltType.INTEGER);
View Full Code Here

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

        Client client = this.getClient();
        VoltTable vt;

        loaderNxN(client, 0);

        vt = client.callProcedure("@AdHoc", "select distinct a1 from t1").getResults()[0];
        System.out.println("testSelectDistinctA result row("
                + vt.getColumnName(0) + ") " + vt);

        // valid result is the set {1,2,...,11}
        int found[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
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.