Package org.voltdb.client

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


        String newCatalogURL;
        VoltTable[] results;
        CatTestCallback callback;

        loadSomeData(client, 0, 25);
        client.drain();

        testStuffThatShouldObviouslyFail(client);

        // asynchronously call some random inserts
        loadSomeData(client, 25, 25);
View Full Code Here


        // add a procedure "InsertOrderLineBatched"
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-expanded.jar");
        callback = new CatTestCallback(Status.OK);
        client.callProcedure(callback, "@UpdateApplicationCatalog", newCatalogURL);

        client.drain();

        // don't care if this succeeds or fails.
        // calling the new proc before the cat change returns is not guaranteed to work
        // we just hope it doesn't crash anything
        int x = 3;
View Full Code Here

                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();

        // make sure the previous catalog change has completed
        client.drain();

        // now calling the new proc better work
        x = 2;
        client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
View Full Code Here

        // this is a do nothing change... shouldn't affect anything
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-expanded.jar");
        results = client.callProcedure("@UpdateApplicationCatalog", newCatalogURL).getResults();
        assertTrue(results.length == 1);

        client.drain();

        // now calling the new proc better work
        x = 4;
        client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
View Full Code Here

                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();

        // make sure the previous catalog change has completed
        client.drain();

        // now calling the new proc better fail
        x = 5;
        cb = new SyncCallback();
        client.callProcedure(cb,
View Full Code Here

        results = client.callProcedure("@UpdateApplicationCatalog", newCatalogURL).getResults();
        assertTrue(results.length == 1);

        loadSomeData(client, 65, 5);

        client.drain();

        assertTrue(true);
    }

    public void loadSomeData(Client client, int start, int count) throws IOException, ProcCallException {
View Full Code Here

            ctr++;
        }

        answersReceived.addAndGet(ctr);

        client.drain();

        while (answersReceived.get() > 0) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
View Full Code Here

                    if (debug.val) LOG.debug("Shutting down client + cluster");
                    this.stop = true;
                    if (cmp.m_controlState == ControlState.RUNNING || cmp.m_controlState == ControlState.PAUSED) {
                        cmp.invokeStopCallback();
                        try {
                            client.drain();
                            client.callProcedure(VoltSystemProcedure.procCallName(Shutdown.class));
                            client.close();
                        } catch (Exception ex) {
                            ex.printStackTrace();
                        }
View Full Code Here

                PRIMARY KEY (ID)
                );
        */
        for(int id=7; id < 15; id++) {
            client.callProcedure(callback, "P1.insert", - id, "X"+String.valueOf(id), 10, 1.1);
            client.drain();
        }
        ClientResponse cr = null;

        // Exercise basic syntax without runtime invocation.
        cr = client.callProcedure("@AdHoc", "select SQL_ERROR(123) from P1 where ID = 0");
View Full Code Here

                            server, pid, e.getMessage());
                    e.printStackTrace();
                    throw new RuntimeException();
                } }

            client.drain();
            client.close();
        }
        System.out.printf("case: %s All nodes of counter identical\n", sPtnOrRep);
    }
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.