public class

CustomRebalancerConfig

extends PartitionedRebalancerConfig
java.lang.Object
   ↳ org.apache.helix.controller.rebalancer.config.BasicRebalancerConfig
     ↳ org.apache.helix.controller.rebalancer.config.PartitionedRebalancerConfig
       ↳ org.apache.helix.controller.rebalancer.config.CustomRebalancerConfig

Class Overview

RebalancerConfig for a resource that should be rebalanced in CUSTOMIZED mode. By default, it corresponds to CustomRebalancer

Summary

Nested Classes
class CustomRebalancerConfig.Builder Build a CustomRebalancerConfig. 
Public Constructors
CustomRebalancerConfig()
Instantiate a CustomRebalancerConfig
Public Methods
void generateDefaultConfiguration(StateModelDefinition stateModelDef, Set<ParticipantId> participantSet)
Generate preference maps based on a default cluster setup
Map<ParticipantIdState> getPreferenceMap(PartitionId partitionId)
Get the preference map of a partition
Map<PartitionIdMap<ParticipantIdState>> getPreferenceMaps()
Get the preference maps of the partitions and replicas of the resource
void setPreferenceMaps(Map<PartitionIdMap<ParticipantIdState>> preferenceMaps)
Set the preference maps of the partitions and replicas of the resource
[Expand]
Inherited Methods
From class org.apache.helix.controller.rebalancer.config.PartitionedRebalancerConfig
From class org.apache.helix.controller.rebalancer.config.BasicRebalancerConfig
From class java.lang.Object
From interface org.apache.helix.controller.rebalancer.config.RebalancerConfig
From interface org.apache.helix.controller.rebalancer.config.ReplicatedRebalancerConfig

Public Constructors

public CustomRebalancerConfig ()

Instantiate a CustomRebalancerConfig

Public Methods

public void generateDefaultConfiguration (StateModelDefinition stateModelDef, Set<ParticipantId> participantSet)

Generate preference maps based on a default cluster setup

Parameters
stateModelDef the state model definition to follow
participantSet the set of participant ids to configure for

public Map<ParticipantIdState> getPreferenceMap (PartitionId partitionId)

Get the preference map of a partition

Parameters
partitionId the partition to look up
Returns
  • map of participant to state

public Map<PartitionIdMap<ParticipantIdState>> getPreferenceMaps ()

Get the preference maps of the partitions and replicas of the resource

Returns
  • map of partition to participant and state

public void setPreferenceMaps (Map<PartitionIdMap<ParticipantIdState>> preferenceMaps)

Set the preference maps of the partitions and replicas of the resource

Parameters
preferenceMaps map of partition to participant and state