public abstract class

IdealStateBuilder

extends Object
java.lang.Object
   ↳ org.apache.helix.model.builder.IdealStateBuilder
Known Direct Subclasses

Summary

Fields
protected ZNRecord _record
protected IdealState.RebalanceMode rebalancerMode Helix rebalancer strategies.
Public Constructors
IdealStateBuilder(String resourceName)
IdealStateBuilder(ResourceId resourceId)
Instantiate with a resource id
Public Methods
IdealState build()
IdealStateBuilder setMaxPartitionsPerNode(int maxPartitionsPerNode)
IdealStateBuilder setNodeGroup(String nodeGroup)
IdealStateBuilder setNumPartitions(int numPartitions)
IdealStateBuilder setNumReplica(int numReplica)
IdealStateBuilder setRebalancerMode(IdealState.RebalanceMode rebalancerMode)
sub-class should implement this to set ideal-state mode
IdealStateBuilder setStateModel(String stateModel)
IdealStateBuilder setStateModelDefId(StateModelDefId stateModelDefId)
Set the state model definition to use with this ideal state
IdealStateBuilder setStateModelFactoryName(String stateModelFactoryName)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected ZNRecord _record

protected IdealState.RebalanceMode rebalancerMode

Helix rebalancer strategies. AUTO, SEMI_AUTO, CUSTOMIZED

Public Constructors

public IdealStateBuilder (String resourceName)

public IdealStateBuilder (ResourceId resourceId)

Instantiate with a resource id

Parameters
resourceId the resource for which to build an ideal state

Public Methods

public IdealState build ()

public IdealStateBuilder setMaxPartitionsPerNode (int maxPartitionsPerNode)

public IdealStateBuilder setNodeGroup (String nodeGroup)

public IdealStateBuilder setNumPartitions (int numPartitions)

public IdealStateBuilder setNumReplica (int numReplica)

public IdealStateBuilder setRebalancerMode (IdealState.RebalanceMode rebalancerMode)

sub-class should implement this to set ideal-state mode

public IdealStateBuilder setStateModel (String stateModel)

public IdealStateBuilder setStateModelDefId (StateModelDefId stateModelDefId)

Set the state model definition to use with this ideal state

Parameters
stateModelDefId state model identifier

public IdealStateBuilder setStateModelFactoryName (String stateModelFactoryName)