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:
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.
Modifier and Type | Field and 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 |
deprecationLogger, logger, settings
Constructor and Description |
---|
ThrottlingAllocationDecider(Settings settings,
ClusterSettings clusterSettings) |
Modifier and Type | Method and Description |
---|---|
Decision |
canAllocate(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be
allocated on the given node. |
canAllocate, canAllocate, canAllocate, canForceAllocatePrimary, canRebalance, canRebalance, canRemain
logDeprecatedSetting, logRemovedSetting, nodeName
public static final int DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES
public static final int DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES
public static final java.lang.String NAME
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING
public static final Setting<java.lang.Integer> CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING
public ThrottlingAllocationDecider(Settings settings, ClusterSettings clusterSettings)
public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given shard routing can be
allocated on the given node. The default is Decision.ALWAYS
.canAllocate
in class AllocationDecider