Package org.voltdb.client

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


        shutdown.set(true);

        // block until all outstanding txns return
        for (Client client : clients) {
            client.drain();
            client.close();
        }

        log.info(HORIZONTAL_RULE);
        log.info("Benchmark Complete");
View Full Code Here


        // load up > 1gb data
        fillTable(6000, client, r);
        System.out.println("100% loaded.");

        client.drain();
        client.close();

        System.out.println("Getting client re-connected.");
        clientConfig = new ClientConfig();
        clientConfig.setProcedureCallTimeout(Long.MAX_VALUE);
View Full Code Here

                    scans.get() / (nanos.get() / 1000000000.0));
        }

        System.out.println("Draining.");

        client.drain();
        client.close();

        System.out.printf("Scanned at %f rows/sec after drain.\n",
                rows.get() / (nanos.get() / 1000000000.0));
View Full Code Here

        // takes control of the whole cluster
        Thread.sleep(1000);
        for (int i = 0; i < test_size; i++) {
            client.callProcedure(callback, "UpdateP1SP", i);
        }
        client.drain();
        ClientResponse resp2 = client.callProcedure("GetP1");
        ClientResponse resp = client.callProcedure("SumP1");
        assertEquals(resp2.getResults()[0].toString(), test_size * 2, resp.getResults()[0].asScalarLong());
    }

View Full Code Here

        };
        client.callProcedure(callback, "MultiRoundMixReadsAndWrites", test_size, test_size / 2);
        for (int i = 0; i < test_size; i++) {
            client.callProcedure(callback, "P1.insert", i, i, 2, Integer.toHexString(i));
        }
        client.drain();
        ClientResponse resp2 = client.callProcedure("GetP1");
        ClientResponse resp = client.callProcedure("SumP1");
        assertEquals(resp2.getResults()[0].toString(), test_size * 2, resp.getResults()[0].asScalarLong());
    }

View Full Code Here

    public void testConsecutiveCatalogDeploymentRace() throws Exception
    {
        System.out.println("\n\n-----\n testConsecutiveCatalogDeploymentRace \n-----\n\n");
        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);

        String newCatalogURL = Configuration.getPathToCatalogForTest("catalogupdate-cluster-addtable.jar");
        String deploymentURL = Configuration.getPathToCatalogForTest("catalogupdate-cluster-addtable.xml");
        // Asynchronously attempt consecutive catalog update and deployment update
View Full Code Here

    public void testUpdateSchemaModificationIsBlacklisted() throws Exception
    {
        System.out.println("\n\n-----\n testUpdateSchemaModificationIsBlacklisted \n-----\n\n");
        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);

        String deploymentURL = Configuration.getPathToCatalogForTest("catalogupdate-cluster-change_schema_update.xml");
        // Try to change the schem setting
        SyncCallback cb = new SyncCallback();
View Full Code Here

    public void testUpdateSecurityNoUsers() throws Exception
    {
        System.out.println("\n\n-----\n testUpdateSecurityNoUsers \n-----\n\n");
        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);

        String deploymentURL = Configuration.getPathToCatalogForTest("catalogupdate-security-no-users.xml");
        // Try to change the schem setting
        SyncCallback cb = new SyncCallback();
View Full Code Here

        callHelper(client, "@AdHoc", "UPDATE R1IX SET NUM = 29 WHERE (R1IX.ID>R1IX.NUM) OR (R1IX.NUM<39)");
        callHelper(client, "@AdHoc", "UPDATE R1IX SET NUM = 29 WHERE (R1IX.ID>R1IX.NUM) OR (R1IX.NUM<61)");
        callHelper(client, "@AdHoc", "UPDATE R1IX SET NUM = 89 WHERE (R1IX.ID>R1IX.NUM) AND (R1IX.NUM>37)");
        callHelper(client, "@AdHoc", "UPDATE R1IX SET NUM = 89 WHERE (R1IX.ID>R1IX.NUM) AND (R1IX.NUM>48)");

        client.drain();

        results = client.callProcedure("@AdHoc", "select * from R1IX").getResults();
        System.out.printf("Table has %d rows.\n", results[0].getRowCount());
        System.out.println(results[0]);

View Full Code Here

                );
        */
        System.out.println("Eng2250: null entries.");
        for(int id=0; id < 5; id++) {
            client.callProcedure(callback, "P1.insert", id, null, 10, 1.1);
            client.drain();
        }
        System.out.println("Eng2250: not null entries.");
        for (int id=5; id < 8; id++) {
            client.callProcedure(callback, "P1.insert", id,"description", 10, 1.1);
            client.drain();
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.