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 String |
CLUSTER_ROUTING_ALLOCATION_CONCURRENT_RECOVERIES |
static String |
CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES |
static String |
CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES |
static int |
DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES |
static int |
DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES |
static String |
NAME |
deprecationLogger, logger, settings
Constructor and Description |
---|
ThrottlingAllocationDecider(Settings settings,
NodeSettingsService nodeSettingsService) |
Modifier and Type | Method and Description |
---|---|
Decision |
canAllocate(RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given node can allow any allocation at all at this state of the
RoutingAllocation . |
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, canRebalance, canRebalance, canRemain
logDeprecatedSetting, logRemovedSetting, nodeName
public static final String NAME
public static final String CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES
public static final String CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES
public static final String CLUSTER_ROUTING_ALLOCATION_CONCURRENT_RECOVERIES
public static final int DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES
public static final int DEFAULT_CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES
@Inject public ThrottlingAllocationDecider(Settings settings, NodeSettingsService nodeSettingsService)
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
public Decision canAllocate(RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given node can allow any allocation at all at this state of the
RoutingAllocation
. The default is Decision.ALWAYS
.canAllocate
in class AllocationDecider
Copyright © 2009–2016. All rights reserved.