Examples of ClientConfig


Examples of voldemort.client.ClientConfig

             */
            for(String hostname: newHostnames) {
                int nodeId = nodeIds.get(hostname);
                AdminClient adminClient = new AdminClient("tcp://" + hostname + ":6666",
                                                          new AdminClientConfig(),
                                                          new ClientConfig());

                Versioned<String> versioned = adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
                                                                                            MetadataStore.CLUSTER_KEY);
                Version version = versioned.getVersion();

                VectorClock vectorClock = (VectorClock) version;
                vectorClock.incrementVersion(nodeId, System.currentTimeMillis());

                try {
                    adminClient.metadataMgmtOps.updateRemoteMetadata(peerNodeId,
                                                                     MetadataStore.CLUSTER_KEY,
                                                                     versioned);
                    adminClient.metadataMgmtOps.updateRemoteMetadata(nodeId,
                                                                     MetadataStore.CLUSTER_KEY,
                                                                     versioned);
                } catch(VoldemortException e) {
                    logger.error(e);
                }
            }

            /**
             * Finally, verify that all of the nodes have been discovered
             */
            assertWithBackoff(1000, 60000, new Attempt() {

                private int count = 1;
                private AdminClient adminClient = new AdminClient("tcp://" + hostNames.get(0)
                                                                          + ":6666",
                                                                  new AdminClientConfig(),
                                                                  new ClientConfig());

                public void checkCondition() throws Exception, AssertionError {
                    logger.info("Attempt " + count++);

                    for(int testNodeId: oldNodeIdSet) {
View Full Code Here

Examples of voldemort.client.ClientConfig

        byte[] v1_bytes = { (byte) 'V', (byte) '1' };
        byte[] v2_bytes = { (byte) 'V', (byte) '2' };
        byte[] k1_bytes = { (byte) 'K', (byte) '1' };
        byte[] k2_bytes = { (byte) 'K', (byte) '2' };
        byte[] k3_bytes = { (byte) 'K', (byte) '3' };
        clientConfig = new ClientConfig();
        clientConfig.setBootstrapUrls(cluster.getNodes().iterator().next().getSocketUrl().toString());
        clientConfig.setClientZoneId(clientZoneId);
        setupZoneAffinitySettings();
        SocketStoreClientFactory socketStoreClientFactory = new SocketStoreClientFactory(clientConfig);
        for(Integer nodeId: cluster.getNodeIds()) {
View Full Code Here

Examples of voldemort.client.ClientConfig

            Properties adminProperties = new Properties();
            adminProperties.setProperty("max_connections", "2");
            adminClient = new AdminClient(servers[0].getMetadataStore().getCluster(),
                                          new AdminClientConfig(adminProperties),
                                          new ClientConfig());
        } catch(Exception e) {
            logger.error("Error in setup", e);
            throw e;
        }
    }
View Full Code Here

Examples of voldemort.client.ClientConfig

        conflict5 = getVersioned(0, 0, 0, 0, 0, 1, 1, 1, 1, 1);
        conflict6 = getVersioned(0, 0, 0, 0, 0, 0, 1, 1, 1, 1);

        Node node = cluster.getNodes().iterator().next();
        String bootstrapUrl = "tcp://" + node.getHost() + ":" + node.getSocketPort();
        StoreClientFactory storeClientFactory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl));

        defaultStoreClient = storeClientFactory.getStoreClient("test");
        socketStore = ServerTestUtils.getSocketStore(socketStoreFactory,
                                                     "test",
                                                     node.getSocketPort(),
View Full Code Here

Examples of voldemort.client.ClientConfig

    }

    public static AdminClient getAdminClient(Cluster cluster) {

        AdminClientConfig config = new AdminClientConfig();
        return new AdminClient(cluster, config, new ClientConfig());
    }
View Full Code Here

Examples of voldemort.client.ClientConfig

        return new AdminClient(cluster, config, new ClientConfig());
    }

    public static AdminClient getAdminClient(String bootstrapURL) {
        AdminClientConfig config = new AdminClientConfig();
        return new AdminClient(bootstrapURL, config, new ClientConfig());
    }
View Full Code Here

Examples of voldemort.client.ClientConfig

                               List<Integer> partitions,
                               ForkLiftTaskMode mode) {
        // set up AdminClient on source cluster
        this.srcAdminClient = new AdminClient(srcBootstrapUrl,
                                              new AdminClientConfig(),
                                              new ClientConfig());

        // set up streaming client to the destination cluster
        Props props = new Props();
        props.put("streaming.platform.bootstrapURL", dstBootstrapUrl);
        props.put("streaming.platform.throttle.qps", maxPutsPerSecond);
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.