Package org.voltdb.client

Examples of org.voltdb.client.ClientConfig


        client = null;

        localServer.start();
        localServer.waitForInitialization();

        client = ClientFactory.createClient(new ClientConfig());
        client.createConnection("localhost");
    }
View Full Code Here


     * @param config Parsed & validated CLI options.
     */
    public AsyncBenchmark(VoterConfig config) {
        this.config = config;

        ClientConfig clientConfig = new ClientConfig(config.user, config.password, new StatusListener());
        clientConfig.setMaxTransactionsPerSecond(config.ratelimit);

        client = ClientFactory.createClient(clientConfig);

        periodicStatsContext = client.createStatsContext();
        fullStatsContext = client.createStatsContext();
View Full Code Here

     * @param config Parsed & validated CLI options.
     */
    public SyncBenchmark(VoterConfig config) {
        this.config = config;

        ClientConfig clientConfig = new ClientConfig("", "", new StatusListener());

        client = ClientFactory.createClient(clientConfig);

        periodicStatsContext = client.createStatsContext();
        fullStatsContext = client.createStatsContext();
View Full Code Here

        // start VoltDB server using hzsqlsb backend
        server = new ServerThread(catalogJar, pb.getPathToDeployment(), target);
        server.start();
        server.waitForInitialization();

        ClientConfig clientConfig = new ClientConfig("program", "none");
        client = ClientFactory.createClient(clientConfig);
        // connect
        client.createConnection("localhost");
    }
View Full Code Here

        client = null;

        localServer.start();
        localServer.waitForInitialization();

        client = ClientFactory.createClient(new ClientConfig());
        client.createConnection("localhost");
    }
View Full Code Here

        config.m_pathToCatalog = pathToCatalog;
        config.m_pathToDeployment = pathToDeployment;

        try {
            startServer(config);
            ClientConfig adminConfig = new ClientConfig("admin", "admin");
            Client adminClient = ClientFactory.createClient(adminConfig);
            ClientConfig userConfig = new ClientConfig("user", "user");
            Client userClient = ClientFactory.createClient(userConfig);

            adminClient.createConnection("localhost");
            // Can't connect a user which doesn't exist
            boolean threw = false;
View Full Code Here

            server.waitForInitialization();

            System.out.printf("PRE:  %s\n", TableHelper.ddlForTable(t1));
            System.out.printf("POST: %s\n", TableHelper.ddlForTable(t2));

            ClientConfig clientConfig = new ClientConfig();
            client = ClientFactory.createClient(clientConfig);
            client.createConnection("localhost");

            TableHelper.loadTable(client, t1);
View Full Code Here

            System.out.printf("POST: %s\n", TableHelper.ddlForTable(t2));

            TableHelper.migrateTable(t1, t2);
            t2 = TableHelper.sortTable(t2);

            ClientConfig clientConfig = new ClientConfig();
            client = ClientFactory.createClient(clientConfig);
            client.createConnection("localhost");

            TableHelper.loadTable(client, t1);
View Full Code Here

            startServer(config);
        }

        void connect(String user, String password) throws Exception
        {
            startClient(new ClientConfig(user, password));
        }
View Full Code Here

                    }
                };

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

                ExecutorService executor = Executors
                        .newFixedThreadPool(clientCount);
                ArrayList<Future<Integer>> futures = new ArrayList<Future<Integer>>(
                        clientCount);
                final CyclicBarrier barrier = new CyclicBarrier(clientCount + 1);
                final long stopTime = System.currentTimeMillis() + 2000;

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

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

TOP

Related Classes of org.voltdb.client.ClientConfig

Copyright © 2018 www.massapicom. 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.