Package org.voltdb.client

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


        assert(catalog_site != null);
        Host catalog_host = catalog_site.getHost();
        assert(catalog_host != null);
        Integer port = CollectionUtil.random(CatalogUtil.getExecutionSitePorts(catalog_site));
        assert(port != null);
        client.createConnection(null, catalog_host.getIpaddr(), port, "user", "password");
        LOG.info(String.format("Connected to H-Store cluster at %s:%d", catalog_host.getIpaddr(), port));
       
        ClientResponse cresponse = VoltProcedureInvoker.invoke(args.catalog,
                                                               client,
                                                               procName,
View Full Code Here


        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG_HOSTS);
       
        // connect to VoltDB server
        Client client = ClientFactory.createClient();
        client.createConnection(null, args.getParam(ArgumentsParser.PARAM_CATALOG_HOSTS), HStoreConstants.DEFAULT_PORT, "user", "password");

        // long w_id, String w_name, String w_street_1, String w_street_2, String w_city, String w_state, String w_zip, double w_tax, double w_ytd
        VoltTable[] result = client.callProcedure("InsertSubscriber", 1l, "0000001").getResults();
       
//        VoltTable[] result = client.callProcedure("InsertWarehouse",
View Full Code Here

        ServerThread server = new ServerThread(catalog,  BackendTarget.NATIVE_EE_JNI);
        server.start();
        server.waitForInitialization();
        Client client = ClientFactory.createClient();
        client.createConnection(null, "localhost", HStoreConstants.DEFAULT_PORT, "program", "none");

        Date generationDateTime = new Date();
        long tm = System.currentTimeMillis();

        System.out.println("making order line table...");
View Full Code Here

    public Client getClient() throws IOException {
        final List<String> listeners = m_config.getListenerAddresses();
        final Random r = new Random();
        final String listener = listeners.get(r.nextInt(listeners.size()));
        final Client client = ClientFactory.createClient();
        client.createConnection(null, listener, HStoreConstants.DEFAULT_PORT, m_username, m_password);
        m_clients.add(client);
        return client;
    }

    /**
 
View Full Code Here

                };

                // trigger classloading a couple times
                {
                    Client client = ClientFactory.createClient();
                    client.createConnection(null, "localhost", HStoreConstants.DEFAULT_PORT, "program", "none");
                    for (int i = 0; i < 10000; i++)
                        client.callProcedure("EmptyProcedure", 0L);
                }

                ExecutorService executor = Executors
View Full Code Here

                for (int i = 0; i < clientCount; i++) {
                    futures.add(executor.submit(new Callable<Integer>() {
                        public Integer call() {
                            try {
                                Client client = ClientFactory.createClient();
                                client.createConnection(
                                        null, "localhost", HStoreConstants.DEFAULT_PORT, "program", "none");

                                int count = 0;
                                barrier.await();
View Full Code Here

        server.start();
        server.waitForInitialization();

        // run the test
        Client client = ClientFactory.createClient();
        client.createConnection(null, "localhost", HStoreConstants.DEFAULT_PORT, "program", "none");

        // call the insert procedure
        VoltTable[] results = client.callProcedure("InsertHistory", 5, 5, 5, 5, 5, 100000L, 2.5, "nada").getResults();
        // check one table was returned
        assertTrue(results.length > 0);
View Full Code Here

            LOG.debug(String.format("Creating new client connection to HStoreSite %s",
                      HStoreThreadManager.formatSiteName(site_id)));
       
        Client new_client = ClientFactory.createClient(128, null, false, null);
        try {
            new_client.createConnection(null, p.getFirst(), p.getSecond(), "user", "password");
        } catch (Exception ex) {
            throw new RuntimeException(String.format("Failed to connect to HStoreSite %s at %s:%d",
                                                     HStoreThreadManager.formatSiteName(site_id), p.getFirst(), p.getSecond()));
        }
        return (new_client);
View Full Code Here

    /** Call dump on each of the servers */
    public void tryDumpAll() {
        Client dumpClient = ClientFactory.createClient();
        for (String host : m_config.hosts) {
            try {
                dumpClient.createConnection(null, host, HStoreConstants.DEFAULT_PORT, "program", "password");
                dumpClient.callProcedure("@dump");
            } catch (UnknownHostException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
View Full Code Here

            LOG.debug(String.format("Creating new client connection to %s:%d",
                      hostname, port));
       
        Client client = ClientFactory.createClient(128, null, false, null);
        try {
            client.createConnection(null, hostname, port, "user", "password");
        } catch (Exception ex) {
            String msg = String.format("Failed to connect to HStoreSite at %s:%d", hostname, port);
            throw new RuntimeException(msg);
        }
        return new TerminalConnection(client, hostname, port);
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.