Class ClusterRebalanceAllocationDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider
This
AllocationDecider
controls re-balancing operations based on the
cluster wide active shard state. This decided can not be configured in
real-time and should be pre-cluster start via
cluster.routing.allocation.allow_rebalance
. This setting respects the following
values:
indices_primaries_active
- Re-balancing is allowed only once all primary shards on all indices are active.indices_all_active
- Re-balancing is allowed only once all shards on all indices are active.always
- Re-balancing is allowed once a shard replication group is active
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An enum representation for the configured re-balance type. -
Field Summary
-
Constructor Summary
ConstructorDescriptionClusterRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
Method Summary
Modifier and TypeMethodDescriptioncanRebalance(RoutingAllocation allocation)
Returns aDecision
whether the cluster can execute re-balanced operations at all.canRebalance(ShardRouting shardRouting, RoutingAllocation allocation)
Returns aDecision
whether the given shard routing can be re-balanced to the given allocation.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRemain, shouldAutoExpandToNode
-
Field Details
-
NAME
- See Also:
- Constant Field Values
-
CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING
public static final Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType> CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING
-
-
Constructor Details
-
ClusterRebalanceAllocationDecider
-
-
Method Details
-
canRebalance
Description copied from class:AllocationDecider
Returns aDecision
whether the given shard routing can be re-balanced to the given allocation. The default isDecision.ALWAYS
.- Overrides:
canRebalance
in classAllocationDecider
-
canRebalance
Description copied from class:AllocationDecider
Returns aDecision
whether the cluster can execute re-balanced operations at all.Decision.ALWAYS
.- Overrides:
canRebalance
in classAllocationDecider
-