java.lang.Object | ||
↳ | org.apache.helix.HelixProperty | |
↳ | org.apache.helix.model.IdealState |
The ideal states of all partitions in a resource
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IdealState.IdealStateModeProperty | Deprecated. | ||||||||||
IdealState.IdealStateProperty | Properties that are persisted and are queryable for an ideal state | ||||||||||
IdealState.RebalanceMode | The mode used for rebalance. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | QUERY_LIST |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Instantiate an ideal state for a resource
| |||||||||||
Instantiate an ideal state for a resource
| |||||||||||
Instantiate an ideal state from a record
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the rebalancing mode on this resource
| |||||||||||
Check for a tag that will restrict assignment to instances with a matching tag
| |||||||||||
Get the instances who host replicas of a partition
| |||||||||||
Get the current mapping of a partition
| |||||||||||
Get the maximum number of partitions an instance can serve
| |||||||||||
Get the number of partitions of this resource
| |||||||||||
Get the participants who host replicas of a partition
| |||||||||||
Get the current mapping of a partition
| |||||||||||
Get all of the partitions
| |||||||||||
Get all of the partitions
| |||||||||||
Get the preference list of a partition
| |||||||||||
Get the preference list of a partition
| |||||||||||
Get the rebalancing mode on this resource
| |||||||||||
Set the frequency with which to rebalance
| |||||||||||
Get the name of the user-defined rebalancer associated with this resource
| |||||||||||
Get a reference to the user-defined rebalancer associated with this resource(if any)
| |||||||||||
Get the number of replicas for each partition of this resource
| |||||||||||
Get the associated resource
| |||||||||||
Get the associated resource
| |||||||||||
Get the state model associated with this resource
| |||||||||||
Get the state model associated with this resource
| |||||||||||
Get the state model factory associated with this resource
| |||||||||||
Get the state model factory associated with this resource
| |||||||||||
Get property validity
| |||||||||||
Convert a partition mapping as strings into a participant state map
| |||||||||||
Convert a full state mapping as strings into participant state maps
| |||||||||||
Convert a preference list of strings into a preference list of participants
| |||||||||||
Convert preference lists of strings into preference lists of participants
| |||||||||||
Parse a rebalance mode from a string.
| |||||||||||
Get the rebalance mode of the ideal state
| |||||||||||
Set a tag to check to enforce assignment to certain instances
| |||||||||||
Set the current mapping of a partition
| |||||||||||
Set the maximum number of partitions of this resource that an instance can serve
| |||||||||||
Set the number of partitions of this resource
| |||||||||||
Set the current mapping of a partition
| |||||||||||
Set the preferred participant placement and state for a partition replica
| |||||||||||
Set the preferred instance placement and state for a partition replica
| |||||||||||
Set the preference list of a partition
| |||||||||||
Set the preference list of a partition
| |||||||||||
Get the rebalance mode of the resource
| |||||||||||
Define a custom rebalancer that implements
HelixRebalancer | |||||||||||
Set a reference to the user-defined rebalancer associated with this resource(if any)
| |||||||||||
Set the number of replicas for each partition of this resource.
| |||||||||||
Set the state model associated with this resource
| |||||||||||
Set the state model associated with this resource
| |||||||||||
Set the state model factory associated with this resource
| |||||||||||
Set the state model factory associated with this resource
| |||||||||||
Convert a preference list of participants into a preference list of strings
| |||||||||||
Convert preference lists of participants into preference lists of strings
| |||||||||||
Convert a partition mapping into a mapping of string names
| |||||||||||
Convert a full state mapping into a mapping of string names
| |||||||||||
Update the ideal state from a ResourceAssignment computed during a rebalance
| |||||||||||
Get the non-Helix simple fields from this property and add them to a UserConfig
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Instantiate an ideal state for a resource
resourceName | the name of the resource |
---|
Instantiate an ideal state for a resource
resourceId | the id of the resource |
---|
Instantiate an ideal state from a record
record | ZNRecord corresponding to an ideal state |
---|
Get the rebalancing mode on this resource
Check for a tag that will restrict assignment to instances with a matching tag
Get the instances who host replicas of a partition
partitionName | the partition to look up |
---|
Get the current mapping of a partition
partitionName | the name of the partition |
---|
Get the maximum number of partitions an instance can serve
Get the number of partitions of this resource
Get the participants who host replicas of a partition
partitionId | the partition to look up |
---|
Get the current mapping of a partition
partitionId | the name of the partition |
---|
Get the preference list of a partition
partitionId | the partition id |
---|
Get the preference list of a partition
partitionName | the name of the partition |
---|
Get the rebalancing mode on this resource
Set the frequency with which to rebalance
Get the name of the user-defined rebalancer associated with this resource
Get a reference to the user-defined rebalancer associated with this resource(if any)
Get the number of replicas for each partition of this resource
Get the state model associated with this resource
Get the state model associated with this resource
Get the state model factory associated with this resource
Get the state model factory associated with this resource
Get property validity
Convert a partition mapping as strings into a participant state map
rawMap | the map of participant name to state |
---|
Convert a full state mapping as strings into participant state maps
rawMaps | the map of partition name to participant name and state |
---|
Convert a preference list of strings into a preference list of participants
rawPreferenceList | the list of strings representing participant names |
---|
Convert preference lists of strings into preference lists of participants
rawPreferenceLists | a map of partition name to a list of participant names |
---|
Parse a rebalance mode from a string. It can also understand IdealStateModeProperty values
mode | string containing a RebalanceMode value |
---|---|
defaultMode | the mode to use if the string is not valid |
Get the rebalance mode of the ideal state
mode | IdealState.IdealStateModeProperty
|
---|
Set a tag to check to enforce assignment to certain instances
groupTag | the instance group tag |
---|
Set the current mapping of a partition
partitionName | the partition to set |
---|---|
instanceStateMap | (participant name, state) pairs |
Set the maximum number of partitions of this resource that an instance can serve
max | the maximum number of partitions supported |
---|
Set the number of partitions of this resource
numPartitions | the number of partitions |
---|
Set the current mapping of a partition
partitionId | the partition to set |
---|---|
participantStateMap | (participant id, state) pairs |
Set the preferred participant placement and state for a partition replica
partitionId | the replica to set |
---|---|
participantId | the assigned participant |
state | the replica state in this instance |
Set the preferred instance placement and state for a partition replica
partitionName | the replica to set |
---|---|
instanceName | the assigned instance |
state | the replica state in this instance |
Set the preference list of a partition
partitionName | the name of the partition to set |
---|---|
preferenceList | a list of participants that can serve replicas of the partition |
Set the preference list of a partition
partitionId | the id of the partition to set |
---|---|
preferenceList | a list of participants that can serve replicas of the partition |
Get the rebalance mode of the resource
Define a custom rebalancer that implements HelixRebalancer
rebalancerClassName | the name of the custom rebalancing class |
---|
Set a reference to the user-defined rebalancer associated with this resource(if any)
rebalancerRef | a reference to a user-defined rebalancer |
---|
Set the number of replicas for each partition of this resource. There are documented special values for the replica count, so this is a String.
replicas | replica count (as a string) |
---|
Set the state model associated with this resource
Set the state model associated with this resource
stateModel | state model identifier |
---|
Set the state model factory associated with this resource
Set the state model factory associated with this resource
name | state model factory name |
---|
Convert a preference list of participants into a preference list of strings
preferenceList | the list of strings representing participant ids |
---|
Convert preference lists of participants into preference lists of strings
preferenceLists | a map of partition id to a list of participant ids |
---|
Convert a partition mapping into a mapping of string names
participantStateMap | the map of participant id to state |
---|
Convert a full state mapping into a mapping of string names
participantStateMaps | the map of partition id to participant id and state |
---|
Update the ideal state from a ResourceAssignment computed during a rebalance
assignment | the new resource assignment |
---|---|
stateModelDef | state model of the resource |
Get the non-Helix simple fields from this property and add them to a UserConfig
userConfig | the user config to update |
---|