- Direct Known Subclasses:
public abstract class AllocationDecider extends Object
AllocationDecideris an abstract base class that allows to make dynamic cluster- or index-wide shard allocation decisions on a per-node basis.
Method SummaryModifier and TypeMethodDescriptionReturns a
Decisionwhether the given shard routing can be allocated on the given node.Returns a
Decisionwhether the given primary shard can be forcibly allocated on the given node.
RoutingAllocation allocation)(Returns a
Decisionwhether the cluster can execute re-balanced operations at all.Returns a
Decisionwhether the given shard routing can be re-balanced to the given allocation.Returns a
Decisionwhether the given shard routing can be remain on the given node.
canAllocatepublic Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
canRemainpublic Decision canRemain(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
canAllocatepublic Decision canAllocate(IndexMetadata indexMetadata, RoutingNode node, RoutingAllocation allocation)
shouldAutoExpandToNodepublic Decision shouldAutoExpandToNode(IndexMetadata indexMetadata, DiscoveryNode node, RoutingAllocation allocation)
canForceAllocatePrimarypublic Decision canForceAllocatePrimary(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)Returns a
Decisionwhether 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
canAllocate(ShardRouting, RoutingNode, RoutingAllocation)before making a decision on force allocation, because force allocation should only be considered if all deciders return