Class ConcurrentRebalanceAllocationDecider
- java.lang.Object
-
- org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
-
- org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider
-
public class ConcurrentRebalanceAllocationDecider extends AllocationDecider
Similar to theClusterRebalanceAllocationDecider
thisAllocationDecider
controls the number of currently in-progress re-balance (relocation) operations and restricts node allocations if the configured threshold is reached. The default number of concurrent rebalance operations is set to2
Re-balance operations can be controlled in real-time via the cluster update API using
cluster.routing.allocation.cluster_concurrent_rebalance
. Iff this setting is set to-1
the number of concurrent re-balance operations are unlimited.
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Integer>
CLUSTER_ROUTING_ALLOCATION_CLUSTER_CONCURRENT_REBALANCE_SETTING
static java.lang.String
NAME
-
Constructor Summary
Constructors Constructor Description ConcurrentRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
Method Summary
Modifier and Type Method Description Decision
canRebalance(RoutingAllocation allocation)
Returns aDecision
whether the cluster can execute re-balanced operations at all.Decision
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, canAllocate, canForceAllocatePrimary, canRemain
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
CLUSTER_ROUTING_ALLOCATION_CLUSTER_CONCURRENT_REBALANCE_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_CLUSTER_CONCURRENT_REBALANCE_SETTING
-
-
Constructor Detail
-
ConcurrentRebalanceAllocationDecider
public ConcurrentRebalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
-
Method Detail
-
canRebalance
public Decision canRebalance(ShardRouting shardRouting, RoutingAllocation allocation)
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
public Decision canRebalance(RoutingAllocation allocation)
Description copied from class:AllocationDecider
Returns aDecision
whether the cluster can execute re-balanced operations at all.Decision.ALWAYS
.- Overrides:
canRebalance
in classAllocationDecider
-
-