org.apache.helix.controller.rebalancer.Rebalancer |
Allows one to come up with custom implementation of a rebalancer.
This will be invoked on all changes that happen in the cluster.
Simply return the newIdealState for a resource in this method.
Deprecated. Use HelixRebalancer
instead.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Given an ideal state for a resource and liveness of instances, compute a assignment of
instances and states to each partition of a resource.
| |||||||||||
Initialize the rebalancer with a HelixManager if necessary
|
Given an ideal state for a resource and liveness of instances, compute a assignment of instances and states to each partition of a resource. This method provides all the relevant information needed to rebalance a resource. If you need additional information use manager.getAccessor to read the cluster data. This allows one to compute the newIdealState according to app specific requirements.
resourceName | the resource for which a mapping will be computed |
---|---|
currentIdealState | the IdealState that corresponds to this resource |
currentStateOutput | the current states of all partitions |
clusterData | cache of the cluster state |
Initialize the rebalancer with a HelixManager if necessary