public final class

SemiAutoRebalancerConfig

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

Class Overview

RebalancerConfig for SEMI_AUTO rebalancer mode. It indicates the preferred locations of each partition replica. By default, it corresponds to SemiAutoRebalancer

Summary

Nested Classes
class SemiAutoRebalancerConfig.Builder Build a SemiAutoRebalancerConfig. 
Public Constructors
SemiAutoRebalancerConfig()
Instantiate a SemiAutoRebalancerConfig
Public Methods
void generateDefaultConfiguration(StateModelDefinition stateModelDef, Set<ParticipantId> participantSet)
Generate preference lists based on a default cluster setup
List<ParticipantId> getPreferenceList(PartitionId partitionId)
Get the preference list of a partition
Map<PartitionIdList<ParticipantId>> getPreferenceLists()
Get the preference lists of all partitions of the resource
void setPreferenceLists(Map<PartitionIdList<ParticipantId>> preferenceLists)
Set the preference lists of all partitions 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 SemiAutoRebalancerConfig ()

Instantiate a SemiAutoRebalancerConfig

Public Methods

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

Generate preference lists based on a default cluster setup

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

public List<ParticipantId> getPreferenceList (PartitionId partitionId)

Get the preference list of a partition

Parameters
partitionId the partition to look up
Returns
  • list of participant ids

public Map<PartitionIdList<ParticipantId>> getPreferenceLists ()

Get the preference lists of all partitions of the resource

Returns
  • map of partition id to list of participant ids

public void setPreferenceLists (Map<PartitionIdList<ParticipantId>> preferenceLists)

Set the preference lists of all partitions of the resource