Class RestoreInProgressAllocationDecider
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
-
- org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDecider
-
public class RestoreInProgressAllocationDecider extends AllocationDecider
ThisAllocationDeciderprevents shards that have failed to be restored from a snapshot to be allocated.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
-
Constructor Summary
Constructors Constructor Description RestoreInProgressAllocationDecider(Settings settings)Creates a newRestoreInProgressAllocationDeciderinstance from given settings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecisioncanAllocate(ShardRouting shardRouting, RoutingAllocation allocation)Returns aDecisionwhether the given shard routing can be allocated at all at this state of theRoutingAllocation.DecisioncanAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)Returns aDecisionwhether the given shard routing can be allocated on the given node.DecisioncanForceAllocatePrimary(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)Returns aDecisionwhether the given primary shard can be forcibly allocated on the given node.-
Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canRebalance, canRebalance, canRemain
-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RestoreInProgressAllocationDecider
public RestoreInProgressAllocationDecider(Settings settings)
Creates a newRestoreInProgressAllocationDeciderinstance from given settings- Parameters:
settings-Settingsto use
-
-
Method Detail
-
canAllocate
public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be allocated on the given node. The default isDecision.ALWAYS.- Overrides:
canAllocatein classAllocationDecider
-
canAllocate
public Decision canAllocate(ShardRouting shardRouting, RoutingAllocation allocation)
Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be allocated at all at this state of theRoutingAllocation. The default isDecision.ALWAYS.- Overrides:
canAllocatein classAllocationDecider
-
canForceAllocatePrimary
public Decision canForceAllocatePrimary(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
Description copied from class:AllocationDeciderReturns aDecisionwhether 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 ofAllocationDecider.canAllocate(ShardRouting, RoutingNode, RoutingAllocation)before making a decision on force allocation, because force allocation should only be considered if all deciders returnDecision.NO.- Overrides:
canForceAllocatePrimaryin classAllocationDecider
-
-