Package voldemort.client

Examples of voldemort.client.ClientConfig


                   long perServerQPSLimit,
                   boolean dryRun,
                   boolean parseOnly) {
        this.storeName = storeName;
        logger.info("Connecting to bootstrap server: " + url);
        this.adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        Cluster cluster = adminClient.getAdminClientCluster();
        logger.info("Cluster determined to be: " + cluster.getName());

        Versioned<List<StoreDefinition>> storeDefinitions = adminClient.metadataMgmtOps.getRemoteStoreDefList();
        List<StoreDefinition> storeDefs = storeDefinitions.getValue();
View Full Code Here


    public QueryServlet() {}

    public QueryServlet(VelocityEngine engine, URI bootstrap) {
        this.engine = engine;
        this.clientFactory = new HttpStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrap.toString())
                                                                          .setMaxThreads(1));
    }
View Full Code Here

        ClosableIterator<Pair<ByteArray, Versioned<Slop>>> iterator = null;

        if(adminClient == null) {
            adminClient = new AdminClient(cluster,
                                          new AdminClientConfig().setMaxConnectionsPerNode(1),
                                          new ClientConfig());
        }

        if(voldemortConfig.getSlopZonesDownToTerminate() > 0) {
            // Populating the zone mapping for early termination
            zoneMapping.clear();
View Full Code Here

    public RebalanceController(String bootstrapUrl,
                               int maxParallelRebalancing,
                               long proxyPauseSec) {
        this.adminClient = new AdminClient(bootstrapUrl,
                                           new AdminClientConfig(),
                                           new ClientConfig());
        Pair<Cluster, List<StoreDefinition>> pair = getCurrentClusterState();
        this.currentCluster = pair.getFirst();
        this.currentStoreDefs = pair.getSecond();

        this.maxParallelRebalancing = maxParallelRebalancing;
View Full Code Here

            startThreeNodeRW();

            // Start another node for only this unit test
            HashMap<ByteArray, byte[]> entrySet = ServerTestUtils.createRandomKeyValuePairs(TEST_SIZE);

            SocketStoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(Lists.newArrayList("tcp://"
                                                                                                                                   + currentCluster.getNodeById(0)
                                                                                                                                                   .getHost()
                                                                                                                                   + ":"
                                                                                                                                   + currentCluster.getNodeById(0)
                                                                                                                                                   .getSocketPort())));
View Full Code Here

            startFourNodeRW();

            // Start another node for only this unit test
            HashMap<ByteArray, byte[]> entrySet = ServerTestUtils.createRandomKeyValuePairs(TEST_SIZE);

            SocketStoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(Lists.newArrayList("tcp://"
                                                                                                                                   + currentCluster.getNodeById(0)
                                                                                                                                                   .getHost()
                                                                                                                                   + ":"
                                                                                                                                   + currentCluster.getNodeById(0)
                                                                                                                                                   .getSocketPort())));
View Full Code Here

            populateData(updatedCurrentCluster,
                         rwStoreDefWithReplication,
                         rebalanceKit.controller.getAdminClient(),
                         false);

            final SocketStoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(getBootstrapUrl(updatedCurrentCluster,
                                                                                                                                      0))
                                                                                                    .setEnableLazy(false)
                                                                                                    .setSocketTimeout(120,
                                                                                                                      TimeUnit.SECONDS));
View Full Code Here

                                break;
                            }
                        }

                        if(!rebalancingComplete.get()) {
                            factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(getBootstrapUrl(updatedCurrentCluster,
                                                                                                                       0))
                                                                                     .setEnableLazy(false)
                                                                                     .setSocketTimeout(120,
                                                                                                       TimeUnit.SECONDS));
View Full Code Here

            }

            String socketUrl = benchmarkProps.getString(URL);
            String storeName = benchmarkProps.getString(STORE_NAME);

            ClientConfig clientConfig = new ClientConfig().setMaxThreads(numThreads)
                                                          .setMaxTotalConnections(numThreads)
                                                          .setMaxConnectionsPerNode(numConnectionsPerNode)
                                                          .setRoutingTimeout(1500,
                                                                             TimeUnit.MILLISECONDS)
                                                          .setSocketTimeout(1500,
                                                                            TimeUnit.MILLISECONDS)
                                                          .setConnectionTimeout(500,
                                                                                TimeUnit.MILLISECONDS)
                                                          .setRequestFormatType(RequestFormatType.VOLDEMORT_V3)
                                                          .setBootstrapUrls(socketUrl);
            // .enableDefaultClient(true);

            if(clientZoneId >= 0) {
                clientConfig.setClientZoneId(clientZoneId);
            }
            SocketStoreClientFactory socketFactory = new SocketStoreClientFactory(clientConfig);
            this.storeClient = socketFactory.getStoreClient(storeName);
            StoreDefinition storeDef = getStoreDefinition(socketFactory, storeName);
            this.keyType = findKeyType(storeDef);
View Full Code Here

        }
    }

    public ZoneShrinkageCLI(String url, Integer droppingZoneId) {
        AdminClientConfig acc = new AdminClientConfig();
        ClientConfig cc = new ClientConfig();
        adminClient = new AdminClient(url, acc, cc);
        this.droppingZoneId = droppingZoneId;
        this.bootstrapUrl = url;
    }
View Full Code Here

TOP

Related Classes of voldemort.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.