Class ClusterRebalanceAllocationDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider
public class ClusterRebalanceAllocationDecider extends AllocationDecider
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
Nested Classes Modifier and Type Class Description static classClusterRebalanceAllocationDecider.ClusterRebalanceTypeAn enum representation for the configured re-balance type. -
Field Summary
Fields Modifier and Type Field Description static Setting<ClusterRebalanceAllocationDecider.ClusterRebalanceType>CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTINGstatic java.lang.StringNAME -
Constructor Summary
Constructors Constructor Description ClusterRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings) -
Method Summary
Modifier and Type Method Description DecisioncanRebalance(RoutingAllocation allocation)Returns aDecisionwhether the cluster can execute re-balanced operations at all.DecisioncanRebalance(ShardRouting shardRouting, RoutingAllocation allocation)Returns aDecisionwhether 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, canAllocate, canForceAllocatePrimary, canRemain, shouldAutoExpandToNode
-
Field Details
-
NAME
public static final java.lang.String 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
-
Method Details
-
canRebalance
Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be re-balanced to the given allocation. The default isDecision.ALWAYS.- Overrides:
canRebalancein classAllocationDecider
-
canRebalance
Description copied from class:AllocationDeciderReturns aDecisionwhether the cluster can execute re-balanced operations at all.Decision.ALWAYS.- Overrides:
canRebalancein classAllocationDecider
-