Package voldemort.client

Examples of voldemort.client.ClientConfig


        int oldPartitionMap[][] = { { 3, 6 }, { 1, 4 }, { 7, 2 }, { 5, 0 } };
        oldRoutingPlan = new BaseStoreRoutingPlan(ServerTestUtils.getLocalCluster(numServers,
                                                                                  oldPartitionMap),
                                                  storeDef);

        SocketStoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootStrapUrl));
        storeClient = factory.getStoreClient("test");
    }
View Full Code Here


            }
            recordCount++;
        }

        // run the prune job
        AdminClient admin = new AdminClient(cluster, new AdminClientConfig(), new ClientConfig());
        for(int nodeid = 0; nodeid < servers.length; nodeid++) {
            admin.storeMntOps.pruneJob(nodeid, "test");
        }
        for(VoldemortServer server: servers) {
            ServerTestUtils.waitForAsyncOperationOnServer(server, "Prune", 5000);
View Full Code Here

    public void setGetPutQuotasForEachServer() throws Exception {
        Properties adminProperties = new Properties();
        adminProperties.setProperty("max_connections", "2");
        adminClient = new AdminClient(cluster,
                                      new AdminClientConfig(adminProperties),
                                      new ClientConfig());

        Map<Pair<Integer, QuotaType>, Integer> throughPutMap = new HashMap<Pair<Integer, QuotaType>, Integer>();
        // Set Node0 Quota
        throughPutMap.put(new Pair<Integer, QuotaType>(0, QuotaType.PUT_THROUGHPUT), 5);
        throughPutMap.put(new Pair<Integer, QuotaType>(0, QuotaType.GET_THROUGHPUT), 20);
View Full Code Here

        HashMap<String, String> keyValuePairsToMasterNode = generateKeysForMasterNode(100);

        String bootStrapUrl = "tcp://" + cluster.getNodeById(0).getHost() + ":"
                              + cluster.getNodeById(0).getSocketPort();
        factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootStrapUrl));
        storeClient = factory.getStoreClient(storeName);

        int numPutExceptions = 0;

        ArrayList<String> putKeysThatSucceeded = new ArrayList<String>();
View Full Code Here

            try {

                populateData(currentCluster, rwStoreDefWithReplication);

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

                                rebalancingStarted.set(true);
                                break;
                            }
                        }
                        if(rebalancingStarted.get()) {
                            factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls
                                                                                      (getBootstrapUrl(updatedCurrentCluster, 3))
                                                                                     .setEnableLazy(false)
                                                                                     .setSocketTimeout(120, TimeUnit.SECONDS)
                                                                                     .setClientZoneId(3));
View Full Code Here

        String outputFile = (String) options.valueOf("output");
        boolean stringKeys = options.has("string-keys");

        AdminClient adminClient = new AdminClient(bootstrapURL,
                                                  new AdminClientConfig(),
                                                  new ClientConfig());
        List<StoreDefinition> storeDefinitionList = adminClient.metadataMgmtOps.getRemoteStoreDefList(nodeId)
                                                                               .getValue();

        StoreDefinition storeDefinition = null;
        for(StoreDefinition def: storeDefinitionList) {
View Full Code Here

                         int keysPerSecondLimit,
                         int progressPeriodOps) {
        if(logger.isInfoEnabled()) {
            logger.info("Connecting to bootstrap server: " + url);
        }
        this.adminClient = new AdminClient(url, new AdminClientConfig(), new ClientConfig());
        this.cluster = adminClient.getAdminClientCluster();
        this.storeDefinitions = adminClient.metadataMgmtOps.getRemoteStoreDefList().getValue();
        this.storeNameSet = new HashSet<String>();
        for(StoreDefinition storeDefinition: storeDefinitions) {
            String storeName = storeDefinition.getName();
View Full Code Here

            try {

                populateData(currentCluster, rwStoreDefWithReplication);

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

                                break;
                            }
                        }

                        if(rebalancingStarted.get()) {
                            factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(getBootstrapUrl(updatedCurrentCluster,
                                                                                                                       0))
                                                                                     .setEnableLazy(false)
                                                                                     .setSocketTimeout(120,
                                                                                                       TimeUnit.SECONDS)
                                                                                     .setClientZoneId(1));
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.