Package org.voltdb.client

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


        // create a valid client and call some procedures
        this.m_username = "user1";
        this.m_password = "userpass1";
        Client client3 = getClient();
        loadSomeData(client3, 50, 10);
        client3.drain();
        assertTrue(callbackSuccess);

        // the old client should not work because the user has been removed.
        loadSomeData(client, 100, 10);
        client.drain();
View Full Code Here


        String explanation;
        VoltTable result;

        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);

        // check that no index was used by checking the plan itself
        callProcedure = client.callProcedure("@Explain", "select * from NEW_ORDER where NO_O_ID = 5;");
        explanation = callProcedure.getResults()[0].fetchRow(0).getString(0);
View Full Code Here

        explanation = callProcedure.getResults()[0].fetchRow(0).getString(0);
        assertTrue(explanation.contains("INDEX SCAN"));

        // tables can still be accessed
        loadSomeData(client, 20, 10);
        client.drain();
        assertTrue(callbackSuccess);

        // check table for the right number of tuples
        callProcedure = client.callProcedure("@AdHoc", "select count(*) from NEW_ORDER;");
        long rowCount = callProcedure.getResults()[0].asScalarLong();
View Full Code Here

        explanation = callProcedure.getResults()[0].fetchRow(0).getString(0);
        assertFalse(explanation.contains("INDEX SCAN"));

        // and loading still succeeds
        loadSomeData(client, 30, 10);
        client.drain();
        assertTrue(callbackSuccess);
    }

    public void testAddDropExpressionIndex() throws Exception
    {
View Full Code Here

        String explanation;
        VoltTable result;

        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);

        // check that no index was used by checking the plan itself
        callProcedure = client.callProcedure("@Explain", "select * from NEW_ORDER where (NO_O_ID+NO_O_ID)-NO_O_ID = 5;");
        explanation = callProcedure.getResults()[0].fetchRow(0).getString(0);
View Full Code Here

        explanation = callProcedure.getResults()[0].fetchRow(0).getString(0);
        assertTrue(explanation.contains("INDEX SCAN"));

        // tables can still be accessed
        loadSomeData(client, 20, 10);
        client.drain();
        assertTrue(callbackSuccess);


        // check table for the right number of tuples
        callProcedure = client.callProcedure("@AdHoc", "select count(*) from NEW_ORDER;");
View Full Code Here

        explanation = callProcedure.getResults()[0].fetchRow(0).getString(0);
        assertFalse(explanation.contains("INDEX SCAN"));

        // and loading still succeeds
        loadSomeData(client, 30, 10);
        client.drain();
        assertTrue(callbackSuccess);
    }

    public void testAddDropTable() throws IOException, ProcCallException, InterruptedException
    {
View Full Code Here

    public void testAddDropTable() throws IOException, ProcCallException, InterruptedException
    {
        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);

        // verify that an insert w/o a table fails.
        try {
            client.callProcedure("@AdHoc", "insert into O1 values (1, 1, 'foo', 'foobar');");
View Full Code Here

        result.advanceRow();
        assertTrue(result.get(2, VoltType.STRING).equals("foo"));

        // old tables can still be accessed
        loadSomeData(client, 20, 10);
        client.drain();
        assertTrue(callbackSuccess);

        // and this new procedure is happy like clams
        callProcedure = client.callProcedure("InsertO1", new Integer(100), new Integer(200), "foo", "bar");
        assertTrue(callProcedure.getResults().length == 1);
View Full Code Here

        catch (ProcCallException e) {
        }

        // and other requests still succeed
        loadSomeData(client, 30, 10);
        client.drain();
        assertTrue(callbackSuccess);
    }

    public void testAddTableWithMatView() throws IOException, ProcCallException, InterruptedException {
        Client client = getClient();
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.