Package org.voltdb.client

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


            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();
        }
        VoltTable r1 = client.callProcedure("@AdHoc", "select count(*) from P1 where desc is null").getResults()[0];
        //* enable for debugging */ System.out.println(r1);
        assertEquals(5, r1.asScalarLong());

View Full Code Here


                int pid = cid % 10;
                client.callProcedure(callback, "ENG1850.insert", cid++, aid, pid, (pid+aid));
            }
        } while (cid < 1000);

        client.drain();

        VoltTable r1 = client.callProcedure("@AdHoc", "select count(*) from ENG1850;").getResults()[0];
        assertEquals(1000, r1.asScalarLong());

        VoltTable r2 = client.callProcedure("@AdHoc", "select count(*) from ENG1850 where pid =2;").getResults()[0];
View Full Code Here

        System.out.printf("Inserting %d rows into the primary table and the view\n", MAX_ROWS);
        for (int i = 0; i < MAX_ROWS; i++) {
            client.callProcedure(modifyOneCheck, insertName, i, String.valueOf(i),
                    filler, filler, filler, filler, filler, filler, filler, filler);
        }
        client.drain();

        // delete half of them - should trigger compaction
        System.out.printf("Deleting all even rows\n");
        for (int i = 0; i < MAX_ROWS; i += 2) {
            client.callProcedure(modifyOneCheck, deleteName, i);
View Full Code Here

        // delete half of them - should trigger compaction
        System.out.printf("Deleting all even rows\n");
        for (int i = 0; i < MAX_ROWS; i += 2) {
            client.callProcedure(modifyOneCheck, deleteName, i);
        }
        client.drain();

        // do a query that hits the index hard
        System.out.printf("Doing a full select and using the index for ordering.\n");
        VoltTable table1 = client.callProcedure(queryName).getResults()[0];
        assertEquals(MAX_ROWS / 2, table1.getRowCount());
View Full Code Here

                        insertProc, ii,  ii % 1000,  ii % 2 , timeStamp);
            }
        }

        try {
            client.drain();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        // Serial aggregation because of no group by
View Full Code Here

            // verify that the admin port works for general use in admin mode
            // add several tuples
            for (int i=0; i < 100; i++) {
                adminclient.callProcedure("InsertA", i, 1000+i);
            }
            adminclient.drain();
            results = adminclient.callProcedure("CountA").getResults();
            assertEquals(100, results[0].asScalarLong());

            // Verify that @SystemInformation tells us the right thing
            results = adminclient.callProcedure("@SystemInformation").getResults();
View Full Code Here

    public void testReplicatedProcTimeout() throws IOException, ProcCallException, InterruptedException {
        System.out.println("test replicated table procedures timeout...");

        Client client = this.getClient();
        loadData(client, "R1", 5000);
        client.drain();

        client.callProcedure("@SystemInformation", "DEPLOYMENT");
        checkDeploymentPropertyValue(client, "querytimeout", Integer.toString(TIMEOUT));

        //
View Full Code Here

        Client client = this.getClient();

        loadData(client, "P1", 10000);
        loadData(client, "R1", 3000);
        client.drain();

        client.callProcedure("@SystemInformation", "DEPLOYMENT");
        checkDeploymentPropertyValue(client, "querytimeout", Integer.toString(TIMEOUT));

        //
View Full Code Here

    }

    public void testCatalogUpgrade() throws IOException, ProcCallException, InterruptedException {
        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);
        String tweakedJarPath = upgradeCatalogBasePath + "-tweaked.jar";

        OutputWatcher watcher = new OutputWatcher("catalog was automatically upgraded", 20, TimeUnit.MILLISECONDS);
        ((LocalCluster)m_config).setOutputWatcher(watcher);
View Full Code Here

    }

    public void testCatalogUpgradeWithBadDDL() throws IOException, ProcCallException, InterruptedException {
        Client client = getClient();
        loadSomeData(client, 0, 10);
        client.drain();
        assertTrue(callbackSuccess);
        String tweakedJarPath = upgradeCatalogBasePath + "-tweaked.jar";

        OutputWatcher watcher = new OutputWatcher("Failed to generate upgraded catalog", 20, TimeUnit.MILLISECONDS);
        ((LocalCluster)m_config).setOutputWatcher(watcher);
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.