public final class

SemiAutoRebalancerContext

extends PartitionedRebalancerContext
java.lang.Object
   ↳ org.apache.helix.controller.rebalancer.context.BasicRebalancerContext
     ↳ org.apache.helix.controller.rebalancer.context.PartitionedRebalancerContext
       ↳ org.apache.helix.controller.rebalancer.context.SemiAutoRebalancerContext

Class Overview

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

Summary

Nested Classes
class SemiAutoRebalancerContext.Builder Build a SemiAutoRebalancerContext. 
Public Constructors
SemiAutoRebalancerContext()
Instantiate a SemiAutoRebalancerContext
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.context.PartitionedRebalancerContext
From class org.apache.helix.controller.rebalancer.context.BasicRebalancerContext
From class java.lang.Object
From interface org.apache.helix.controller.rebalancer.context.RebalancerContext
From interface org.apache.helix.controller.rebalancer.context.ReplicatedRebalancerContext

Public Constructors

public SemiAutoRebalancerContext ()

Instantiate a SemiAutoRebalancerContext

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