Package org.voltdb.client

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


        LOG.debug(String.format("Creating new client connection to HStoreSite %s at %s:%d",
                                HStoreThreadManager.formatSiteName(catalog_site.getId()),
                                hostName, port));
       
        Client client = ClientFactory.createClient(128, null, false, null);
        client.createConnection(null, hostName, port, "user", "password");
        return (client);
    }
   
    // --------------------------------------------------------------------------------------
    // FILE LOADING METHODS
View Full Code Here


        ServerThread localServer = new ServerThread(config);
        localServer.start();
        localServer.waitForInitialization();

        Client client = ClientFactory.createClient();
        client.createConnection("localhost");

        ClientResponse cr = client.callProcedure("Insert", 5, new byte[] { 'a' });
        assertTrue(cr.getStatus() == ClientResponse.SUCCESS);

        // stop execution
View Full Code Here

        ServerThread server = new ServerThread(config);
        server.start();
        server.waitForInitialization();

        Client client = ClientFactory.createClient();
        client.createConnection("localhost");

        ClientResponse response1;
        response1 = client.callProcedure("Insert", "FOO", "BAR", "BOO");
        assert(response1.getStatus() == ClientResponse.SUCCESS);
View Full Code Here

    public void testRoundTripCJKWithRegularInsert() throws Exception {
        ServerThread server = startup();

        Client client = ClientFactory.createClient();
        client.createConnection("localhost");

        ClientResponse response1;
        response1 = client.callProcedure("Insert",
                POORLY_TRANSLATED_CHINESE, POORLY_TRANSLATED_JAPANESE, POORLY_TRANSLATED_KOREAN);
        assertEquals(response1.getStatus(), ClientResponse.SUCCESS);
View Full Code Here

        assertEquals(0, c.compareTo(POORLY_TRANSLATED_CHINESE));
        assertEquals(0, j.compareTo(POORLY_TRANSLATED_JAPANESE));
        assertEquals(0, k.compareTo(POORLY_TRANSLATED_KOREAN));

        Client client = ClientFactory.createClient();
        client.createConnection("localhost");

        ClientResponse response1;
        response1 = client.callProcedure("Select");
        assertEquals(response1.getStatus(), ClientResponse.SUCCESS);
View Full Code Here

        ServerThread localServer = new ServerThread(config);
        localServer.start();
        localServer.waitForInitialization();

        Client client = ClientFactory.createClient();
        client.createConnection("localhost");

        try {
            ClientResponse r = client.callProcedure("CrushExpectations", 0);
            assertEquals(0, r.getResults()[0].asScalarLong());
        }
View Full Code Here

        try {
            final Client client = ClientFactory.createClient();
            final Random rng = new Random();

            for (String s : args) {
                client.createConnection(s, Client.VOLTDB_SERVER_PORT);
            }

            for (int i=0; i < SimpleBenchmark.TXNS; i++) {
                ClientResponse response =
                    client.callProcedure("VOTES.insert", rng.nextLong(), "MA", Integer.valueOf(i));
View Full Code Here

            adminClient.createConnection("localhost");
            // Can't connect a user which doesn't exist
            boolean threw = false;
            try {
                userClient.createConnection("localhost");
            }
            catch (IOException ioe) {
                threw = true;
                assertTrue(ioe.getMessage().contains("Authentication rejected"));
            }
View Full Code Here

                fail("Adding 'user' should have succeeded this time");
            }

            // Check that we can connect the new user
            try {
                userClient.createConnection("localhost");
            }
            catch (IOException ioe) {
                ioe.printStackTrace();
                fail("Should have been able to connect 'user'");
            }
View Full Code Here

        cluster.startUp(true);

        final String listener = cluster.getListenerAddresses().get(0);
        final Client client = ClientFactory.createClient();
        //client.createConnection(listener);
        client.createConnection(listener);

        try {
            client.callProcedure("CrashVoltDBProc");
        }
        catch (Exception e) {
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.