Package voldemort.client.rebalance

Examples of voldemort.client.rebalance.RebalancePlan


        // Compare to original partition ids list
        assertTrue("Original and interm partition ids don't match",
                   originalPartitions.equals(finalPartitions));

        // Make sure that there is no data movement
        RebalancePlan rebalancePlan = ClusterTestUtils.makePlan(initialCluster,
                                                                storeDefs,
                                                                interimCluster,
                                                                storeDefs);
        // Make sure we have a plan
        assertEquals(rebalancePlan.getPlan().size(), 1);

        // Make sure there is no cross zones between zones in the plan
        assertEquals(rebalancePlan.getPartitionStoresMovedXZone(), 0);
        // Make sure there is no data movement between nodes
        assertEquals(rebalancePlan.getPartitionStoresMoved(), 0);
        for(Integer nodeId: interimCluster.getNodeIds()) {
            Set<Integer> remainingNodes = Sets.symmetricDifference(interimCluster.getNodeIds(),
                                                                   Sets.newHashSet(nodeId));
            for(Integer otherNodeId: remainingNodes) {
                assertTrue("Something went wrong as there is data movement between nodes",
                           rebalancePlan.getNodeMoveMap().get(nodeId, otherNodeId) == 0);
            }
        }

        // Also get the adjusted store definitions, with the zone dropped
        Cluster finalCluster = RebalanceUtils.dropZone(interimCluster, dropZoneId);
View Full Code Here


                                         List<StoreDefinition> fStores) {
        // Defaults for plans
        int batchSize = RebalancePlan.BATCH_SIZE;
        String outputDir = null;

        return new RebalancePlan(cCluster, cStores, fCluster, fStores, batchSize, outputDir);
    }
View Full Code Here

                                               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

                                               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

        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

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

        new RebalancePlan(currentCluster,
                          currentStoreDefs,
                          finalCluster,
                          finalStoreDefs,
                          batchSize,
                          outputDir);
View Full Code Here

TOP

Related Classes of voldemort.client.rebalance.RebalancePlan

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.