public interface

Rebalancer

org.apache.helix.controller.rebalancer.Rebalancer
Known Indirect Subclasses

Class Overview

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.

Summary

Public Methods
abstract IdealState computeNewIdealState(String resourceName, IdealState currentIdealState, CurrentStateOutput currentStateOutput, ClusterDataCache clusterData)
This method provides all the relevant information needed to rebalance a resource.
abstract void init(HelixManager manager)

Public Methods

public abstract IdealState computeNewIdealState (String resourceName, IdealState currentIdealState, CurrentStateOutput currentStateOutput, ClusterDataCache clusterData)

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 requirement.

Parameters
resourceName Name of the resource to be rebalanced
currentStateOutput Provides the current state and pending state transition for all partitions
clusterData Provides additional methods to retrieve cluster data.

public abstract void init (HelixManager manager)