voldemort.client.rebalance
Class RebalanceClusterPlan

java.lang.Object
  extended by voldemort.client.rebalance.RebalanceClusterPlan

public class RebalanceClusterPlan
extends java.lang.Object

Compares the current cluster configuration with the target cluster configuration and generates a plan to move the partitions. The plan can be either generated from the perspective of the stealer or the donor.
The end result is one of the following -

  • A map of stealer node-ids to partitions desired to be stolen from various donor nodes
  • A map of donor node-ids to partitions which we need to donate to various stealer nodes


    Constructor Summary
    RebalanceClusterPlan(Cluster currentCluster, Cluster targetCluster, java.util.List<StoreDefinition> storeDefs, boolean enabledDeletePartition)
              Compares the currentCluster configuration with the desired targetConfiguration and builds a map of Target node-id to map of source node-ids and partitions desired to be stolen/fetched.
    RebalanceClusterPlan(Cluster currentCluster, Cluster targetCluster, java.util.List<StoreDefinition> storeDefs, boolean enabledDeletePartition, boolean isStealerBased)
              Compares the currentCluster configuration with the desired targetConfiguration and builds a map of Target node-id to map of source node-ids and partitions desired to be stolen/fetched.
     
    Method Summary
     java.util.Queue<RebalanceNodePlan> getRebalancingTaskQueue()
               
     java.lang.String printPartitionDistribution()
               
     java.lang.String toString()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    RebalanceClusterPlan

    public RebalanceClusterPlan(Cluster currentCluster,
                                Cluster targetCluster,
                                java.util.List<StoreDefinition> storeDefs,
                                boolean enabledDeletePartition)
    Compares the currentCluster configuration with the desired targetConfiguration and builds a map of Target node-id to map of source node-ids and partitions desired to be stolen/fetched.

    Parameters:
    currentCluster - The current cluster definition
    targetCluster - The target cluster definition
    storeDefs - The list of store definitions to rebalance
    enabledDeletePartition - Delete the RW partition on the donor side after rebalance
    isStealerBased - Do we want to generate the final plan based on the stealer node or the donor node?

    RebalanceClusterPlan

    public RebalanceClusterPlan(Cluster currentCluster,
                                Cluster targetCluster,
                                java.util.List<StoreDefinition> storeDefs,
                                boolean enabledDeletePartition,
                                boolean isStealerBased)
    Compares the currentCluster configuration with the desired targetConfiguration and builds a map of Target node-id to map of source node-ids and partitions desired to be stolen/fetched.

    Parameters:
    currentCluster - The current cluster definition
    targetCluster - The target cluster definition
    storeDefList - The list of store definitions to rebalance
    enabledDeletePartition - Delete the RW partition on the donor side after rebalance
    isStealerBased - Do we want to generate the final plan based on the stealer node or the donor node?
    Method Detail

    getRebalancingTaskQueue

    public java.util.Queue<RebalanceNodePlan> getRebalancingTaskQueue()

    toString

    public java.lang.String toString()
    Overrides:
    toString in class java.lang.Object

    printPartitionDistribution

    public java.lang.String printPartitionDistribution()


    Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu