public abstract class

BasicRebalancerConfig

extends Object
implements RebalancerConfig
java.lang.Object
   ↳ org.apache.helix.controller.rebalancer.config.BasicRebalancerConfig
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Abstract RebalancerConfig that functions for generic subunits. Use a subclass that more concretely defines the subunits.

Summary

Nested Classes
class BasicRebalancerConfig.AbstractBuilder<T extends AbstractBuilder<T>> Abstract builder for the base rebalancer config  
Public Constructors
BasicRebalancerConfig()
Instantiate a basic rebalancer config
Public Methods
static <T extends RebalancerConfig> T convert(RebalancerConfig config, Class<T> clazz)
Safely cast a RebalancerConfig into a subtype
String getParticipantGroupTag()
Get the tag, if any, that participants must have in order to serve this resource
RebalancerRef getRebalancerRef()
Get a reference to the class used to rebalance this resource
ResourceId getResourceId()
Get the resource to rebalance
Class<? extends StringSerializer> getSerializerClass()
Get the serializer.
StateModelDefId getStateModelDefId()
Get the state model definition that the resource follows
StateModelFactoryId getStateModelFactoryId()
Get the state model factory of this resource
Partition getSubUnit(PartitionId subUnitId)
Get a specific subunit
Set<? extends PartitionId> getSubUnitIdSet()
Get the subunits of the resource (e.g.
void setParticipantGroupTag(String participantGroupTag)
Set a tag that participants must have in order to serve this resource
void setRebalancerRef(RebalancerRef rebalancerRef)
Set the reference to the class used to rebalance this resource
void setResourceId(ResourceId resourceId)
Set the resource to rebalance
void setSerializerClass(Class<? extends StringSerializer> serializer)
Set the class that can serialize this config
void setStateModelDefId(StateModelDefId stateModelDefId)
Set the state model definition that the resource follows
void setStateModelFactoryId(StateModelFactoryId stateModelFactoryId)
Set the state model factory that the resource uses
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.controller.rebalancer.config.RebalancerConfig

Public Constructors

public BasicRebalancerConfig ()

Instantiate a basic rebalancer config

Public Methods

public static T convert (RebalancerConfig config, Class<T> clazz)

Safely cast a RebalancerConfig into a subtype

Parameters
config RebalancerConfig object
clazz the target class
Returns
  • An instance of clazz, or null if the conversion is not possible

public String getParticipantGroupTag ()

Get the tag, if any, that participants must have in order to serve this resource

Returns
  • participant group tag, or null

public RebalancerRef getRebalancerRef ()

Get a reference to the class used to rebalance this resource

Returns
  • RebalancerRef

public ResourceId getResourceId ()

Get the resource to rebalance

Returns
  • resource id

public Class<? extends StringSerializer> getSerializerClass ()

Get the serializer. If none is provided, DefaultStringSerializer is used

Returns
  • StringSerializer class object

public StateModelDefId getStateModelDefId ()

Get the state model definition that the resource follows

Returns
  • state model definition id

public StateModelFactoryId getStateModelFactoryId ()

Get the state model factory of this resource

Returns
  • state model factory id

public Partition getSubUnit (PartitionId subUnitId)

Get a specific subunit

Parameters
subUnitId the id of the subunit
Returns
  • SubUnit

public Set<? extends PartitionId> getSubUnitIdSet ()

Get the subunits of the resource (e.g. partitions)

Returns
  • set of subunit ids

public void setParticipantGroupTag (String participantGroupTag)

Set a tag that participants must have in order to serve this resource

Parameters
participantGroupTag string group tag

public void setRebalancerRef (RebalancerRef rebalancerRef)

Set the reference to the class used to rebalance this resource

Parameters
rebalancerRef RebalancerRef instance

public void setResourceId (ResourceId resourceId)

Set the resource to rebalance

Parameters
resourceId resource id

public void setSerializerClass (Class<? extends StringSerializer> serializer)

Set the class that can serialize this config

Parameters
serializer serializer class that implements StringSerializer

public void setStateModelDefId (StateModelDefId stateModelDefId)

Set the state model definition that the resource follows

Parameters
stateModelDefId state model definition id

public void setStateModelFactoryId (StateModelFactoryId stateModelFactoryId)

Set the state model factory that the resource uses

Parameters
stateModelFactoryId state model factory id