public class MaxRetryAllocationDecider extends AllocationDecider
RoutingAllocation.isRetryFailed()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static Setting<java.lang.Integer> |
SETTING_ALLOCATION_MAX_RETRY |
deprecationLogger, logger, settings
Constructor and Description |
---|
MaxRetryAllocationDecider(Settings settings)
Initializes a new
MaxRetryAllocationDecider |
Modifier and Type | Method and Description |
---|---|
Decision |
canAllocate(ShardRouting shardRouting,
RoutingAllocation allocation)
Returns a
Decision whether the given shard routing can be allocated 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. |
Decision |
canForceAllocatePrimary(ShardRouting shardRouting,
RoutingNode node,
RoutingAllocation allocation)
Returns a
Decision whether the given primary shard can be
forcibly allocated on the given node. |
canAllocate, canAllocate, canRebalance, canRebalance, canRemain
logDeprecatedSetting, logRemovedSetting, nodeName
public static final Setting<java.lang.Integer> SETTING_ALLOCATION_MAX_RETRY
public static final java.lang.String NAME
public MaxRetryAllocationDecider(Settings settings)
MaxRetryAllocationDecider
settings
- Settings
used by this AllocationDecider
public Decision canAllocate(ShardRouting shardRouting, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given shard routing can be allocated at all at this state of the
RoutingAllocation
. The default is Decision.ALWAYS
.canAllocate
in class AllocationDecider
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 canForceAllocatePrimary(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
AllocationDecider
Decision
whether the given primary shard can be
forcibly allocated on the given node. This method should only be called
for unassigned primary shards where the node has a shard copy on disk.
Note: all implementations that override this behavior should take into account
the results of AllocationDecider.canAllocate(ShardRouting, RoutingNode, RoutingAllocation)
before making a decision on force allocation, because force allocation should only
be considered if all deciders return Decision.NO
.canForceAllocatePrimary
in class AllocationDecider