Class ThrottlingAllocationDecider
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
-
- org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider
-
public class ThrottlingAllocationDecider extends AllocationDecider
ThrottlingAllocationDecider
controls the recovery process per node in the cluster. It exposes two settings via the cluster update API that allow changes in real-time:cluster.routing.allocation.node_initial_primaries_recoveries
- restricts the number of initial primary shard recovery operations on a single node. The default is4
cluster.routing.allocation.node_concurrent_recoveries
- restricts the number of total concurrent shards initializing on a single node. The default is2
If one of the above thresholds is exceeded per node this allocation decider will return
Decision.THROTTLE
as a hit to upstream logic to throttle the allocation process to prevent overloading nodes due to too many concurrent recovery processes.
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Integer>
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING
static Setting<java.lang.Integer>
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING
static Setting<java.lang.Integer>
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING
static Setting<java.lang.Integer>
CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING
static int
DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES
static int
DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES
static java.lang.String
NAME
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
logger
-
-
Constructor Summary
Constructors Constructor Description ThrottlingAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Decision
canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
Returns aDecision
whether the given shard routing can be allocated on the given node.-
Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRebalance, canRebalance, canRemain
-
-
-
-
Field Detail
-
DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES
public static final int DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES
- See Also:
- Constant Field Values
-
DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES
public static final int DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING
-
CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING
-
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING
-
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING
-
-
Constructor Detail
-
ThrottlingAllocationDecider
public ThrottlingAllocationDecider(Settings settings, ClusterSettings clusterSettings)
-
-
Method Detail
-
canAllocate
public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
Description copied from class:AllocationDecider
Returns aDecision
whether the given shard routing can be allocated on the given node. The default isDecision.ALWAYS
.- Overrides:
canAllocate
in classAllocationDecider
-
-