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 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 definitiontargetCluster - The target cluster definitionstoreDefs - The list of store definitions to rebalanceenabledDeletePartition - Delete the RW partition on the donor side
after rebalanceisStealerBased - 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 definitiontargetCluster - The target cluster definitionstoreDefList - The list of store definitions to rebalanceenabledDeletePartition - Delete the RW partition on the donor side
after rebalanceisStealerBased - Do we want to generate the final plan based on the
stealer node or the donor node?
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