Package org.voltdb.client

Examples of org.voltdb.client.ClientConfig


        this.keyBase = clientConnectionKeyBase;
        this.key = clientConnectionKey;

        // Create configuration
        this.config = new ClientConfig(user, password);
        config.setHeavyweight(isHeavyWeight);
        if (maxOutstandingTxns > 0)
            config.setMaxOutstandingTxns(maxOutstandingTxns);

        // Create client and connect.
View Full Code Here


        }
        // Split server list
        final String[] serverlist = config.servers.split(",");

        // Create connection
        final ClientConfig c_config = new ClientConfig(config.user, config.password);
        c_config.setProcedureCallTimeout(0); // Set procedure all to infinite
        Client csvClient = null;
        try {
            csvClient = CSVLoader.getClient(c_config, serverlist, config.port);
        } catch (Exception e) {
            m_log.error("Error connecting to the servers: "
View Full Code Here

            else if (parts[0].equalsIgnoreCase("password")) {
                password = parts[1];
            }
        }

        ClientConfig config = new ClientConfig(username, password);
        final Client client = ClientFactory.createClient(config);
        client.createConnection(host);

        File configFile = new File(configFilePath);
View Full Code Here

        configuration();
        // Split server list
        final String[] serverlist = config.servers.split(",");

        // Create connection
        final ClientConfig c_config = new ClientConfig(config.user, config.password);
        c_config.setProcedureCallTimeout(0); // Set procedure all to infinite
        Client csvClient = null;
        try {
            csvClient = JDBCLoader.getClient(c_config, serverlist, config.port);
        } catch (Exception e) {
            m_log.error("Error connecting to the servers: "
View Full Code Here

    public void processKafkaMessages() throws Exception {
        // Split server list
        final String[] serverlist = m_config.servers.split(",");

        // Create connection
        final ClientConfig c_config = new ClientConfig(m_config.user, m_config.password);
        c_config.setProcedureCallTimeout(0); // Set procedure all to infinite

        m_client = getClient(c_config, serverlist, m_config.port);

        if (m_config.useSuppliedProcedure) {
            m_loader = new CSVTupleDataLoader((ClientImpl) m_client, m_config.procedure, new KafkaBulkLoaderCallback());
View Full Code Here

            msg += e.getMessage();
            throw new RuntimeException(msg);
        }

        m_pollInterval = pollInterval;
        ClientConfig clientConfig = new ClientConfig(voltUsername, voltPassword);
        m_client = ClientFactory.createClient(clientConfig);
        int successfulConnections = 0;
        for (InetSocketAddress host : voltHosts) {
            try {
                m_client.createConnection(ReverseDNSCache.hostnameOrAddress(host.getAddress()));
View Full Code Here

            // Don't ask... Java is such a crippled language!
            DateParser.setLenient(true);

            // Create connection
            ClientConfig config = new ClientConfig(user, password);
            config.setProcedureCallTimeout(0)// Set procedure all to infinite timeout, see ENG-2670

            // if specified enable kerberos
            if (!kerberos.isEmpty()) {
                config.enableKerberosAuthentication(kerberos);
            }
            VoltDB = getClient(config, servers, port);

            // Load user stored procs
            loadStoredProcedures(Procedures, Classlist);
View Full Code Here

     */
    public Client getClient(long timeout) throws IOException {
        final List<String> listeners = m_config.getListenerAddresses();
        final Random r = new Random();
        String listener = listeners.get(r.nextInt(listeners.size()));
        ClientConfig config = new ClientConfigForTest(m_username, m_password);
        config.setConnectionResponseTimeout(timeout);
        config.setProcedureCallTimeout(timeout);
        final Client client = ClientFactory.createClient(config);
        // Use the port generated by LocalCluster if applicable
        try {
            client.createConnection(listener);
        }
View Full Code Here

     * @return A VoltClient instance connected to the server driven by the
     * VoltServerConfig instance.
     */
    public Client getClientToHostId(int hostId, long timeout) throws IOException {
        final String listener = m_config.getListenerAddress(hostId);
        ClientConfig config = new ClientConfigForTest(m_username, m_password);
        config.setConnectionResponseTimeout(timeout);
        config.setProcedureCallTimeout(timeout);
        final Client client = ClientFactory.createClient(config);
        try {
            client.createConnection(listener);
        }
        // retry once
View Full Code Here

    }

    public Client getFullyConnectedClient(long timeout) throws IOException {
        final List<String> listeners = m_config.getListenerAddresses();
        final Random r = new Random();
        ClientConfig config = new ClientConfigForTest(m_username, m_password);
        config.setConnectionResponseTimeout(timeout);
        config.setProcedureCallTimeout(timeout);
        final Client client = ClientFactory.createClient(config);
        for (String listener : listeners) {
            // Use the port generated by LocalCluster if applicable
            try {
                client.createConnection(listener);
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.