public class

ConstraintBasedAssignment

extends Object
java.lang.Object
   ↳ org.apache.helix.controller.rebalancer.util.ConstraintBasedAssignment

Class Overview

Collection of functions that will compute the best possible states given the live instances and an ideal state.

Summary

Public Constructors
ConstraintBasedAssignment()
Public Methods
static Map<StringString> computeAutoBestStateForPartition(ClusterDataCache cache, StateModelDefinition stateModelDef, List<String> instancePreferenceList, Map<StringString> currentStateMap, Set<String> disabledInstancesForPartition)
compute best state for resource in AUTO ideal state mode
static List<String> getPreferenceList(ClusterDataCache cache, Partition resource, IdealState idealState, StateModelDefinition stateModelDef)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ConstraintBasedAssignment ()

Public Methods

public static Map<StringString> computeAutoBestStateForPartition (ClusterDataCache cache, StateModelDefinition stateModelDef, List<String> instancePreferenceList, Map<StringString> currentStateMap, Set<String> disabledInstancesForPartition)

compute best state for resource in AUTO ideal state mode

Parameters
currentStateMap : instance->state for each partition

public static List<String> getPreferenceList (ClusterDataCache cache, Partition resource, IdealState idealState, StateModelDefinition stateModelDef)