Module org.elasticsearch.server
Class SnapshotInProgressAllocationDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider
This
AllocationDecider prevents shards that
are currently been snapshotted to be moved to other nodes.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be allocated on the given node.canForceAllocateDuringReplace(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard can be forced to the given node in the event that the shard's source node is being replaced.canRebalance(ShardRouting shardRouting, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be re-balanced to the given allocation.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canAllocateReplicaWhenThereIsRetentionLease, canForceAllocatePrimary, canRebalance, canRemain, getForcedInitialShardAllocationToNodes, shouldAutoExpandToNode
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
SnapshotInProgressAllocationDecider
public SnapshotInProgressAllocationDecider()
-
-
Method Details
-
canRebalance
Returns aDecisionwhether the given shard routing can be re-balanced to the given allocation. The default isDecision.ALWAYS.- Overrides:
canRebalancein classAllocationDecider
-
canAllocate
public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be allocated on the given node. The default isDecision.ALWAYS.- Overrides:
canAllocatein classAllocationDecider
-
canForceAllocateDuringReplace
public Decision canForceAllocateDuringReplace(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard can be forced to the given node in the event that the shard's source node is being replaced. This allows nodes using a replace-type node shutdown to override certain deciders in the interest of moving the shard away from a node that *must* be removed. It defaults to returning "YES" and must be overridden by deciders that opt-out to having their other NO decisions *not* overridden while vacating. The caller is responsible for first checking: - that a replacement is ongoing - the shard routing's current node is the source of the replacement- Overrides:
canForceAllocateDuringReplacein classAllocationDecider
-