Package voldemort.client.rebalance

Examples of voldemort.client.rebalance.RebalanceController


    public static RebalanceKit getRebalanceKit(String bootstrapUrl,
                                               int maxParallel,
                                               long proxyPauseS,
                                               Cluster finalCluster) {
        RebalanceController rebalanceController = new RebalanceController(bootstrapUrl,
                                                                          maxParallel,
                                                                          proxyPauseS);
        RebalancePlan rebalancePlan = rebalanceController.getPlan(finalCluster,
                                                                  RebalancePlan.BATCH_SIZE);

        return new RebalanceKit(rebalanceController, rebalancePlan);
    }
View Full Code Here


    }

    public static RebalanceKit getRebalanceKit(String bootstrapUrl,
                                               Cluster finalCluster,
                                               List<StoreDefinition> finalStoreDefs) {
        RebalanceController rebalanceController = new RebalanceController(bootstrapUrl,
                                                                          RebalanceController.MAX_PARALLEL_REBALANCING,
                                                                          REBALANCE_CONTROLLER_TEST_PROXY_PAUSE_IN_SECONDS);
        RebalancePlan rebalancePlan = rebalanceController.getPlan(finalCluster,
                                                                  finalStoreDefs,
                                                                  RebalancePlan.BATCH_SIZE);
        return new RebalanceKit(rebalanceController, rebalancePlan);
    }
View Full Code Here

        long proxyPauseSec = RebalanceController.PROXY_PAUSE_IN_SECONDS;
        if(options.has("proxy-pause")) {
            proxyPauseSec = (Long) options.valueOf("proxy-pause");
        }

        RebalanceController rebalanceController = new RebalanceController(bootstrapURL,
                                                                          parallelism,
                                                                          proxyPauseSec);

        Cluster currentCluster = rebalanceController.getCurrentCluster();
        List<StoreDefinition> currentStoreDefs = rebalanceController.getCurrentStoreDefs();
        // If this test doesn't pass, something is wrong in prod!
        RebalanceUtils.validateClusterStores(currentCluster, currentStoreDefs);

        // Determine final cluster/stores and validate them
        String finalClusterXML = (String) options.valueOf("final-cluster");
        Cluster finalCluster = new ClusterMapper().readCluster(new File(finalClusterXML));

        List<StoreDefinition> finalStoreDefs = currentStoreDefs;
        if(options.has("final-stores")) {
            String storesXML = (String) options.valueOf("final-stores");
            finalStoreDefs = new StoreDefinitionsMapper().readStoreList(new File(storesXML));
        }
        RebalanceUtils.validateClusterStores(finalCluster, finalStoreDefs);
        RebalanceUtils.validateCurrentFinalCluster(currentCluster, finalCluster);

        // Process optional "planning" arguments
        int batchSize = CmdUtils.valueOf(options, "batch-size", RebalancePlan.BATCH_SIZE);

        String outputDir = null;
        if(options.has("output-dir")) {
            outputDir = (String) options.valueOf("output-dir");
        }

        // Plan & execute rebalancing.
        rebalanceController.rebalance(new RebalancePlan(currentCluster,
                                                        currentStoreDefs,
                                                        finalCluster,
                                                        finalStoreDefs,
                                                        batchSize,
                                                        outputDir));
View Full Code Here

TOP

Related Classes of voldemort.client.rebalance.RebalanceController

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.