Module org.elasticsearch.server
Class IndexBalanceAllocationDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.IndexBalanceAllocationDecider
For an index of n shards hosted by a cluster of m nodes, a node should not host
significantly more than n / m shards. This allocation decider enforces this principle.
This allocation decider excludes any nodes flagged for shutdown from consideration
when computing optimal shard distributions.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIndexBalanceAllocationDecider(Settings settings, ClusterSettings clusterSettings) -
Method Summary
Modifier and TypeMethodDescriptioncanAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be allocated on the given node.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canAllocateReplicaWhenThereIsRetentionLease, canForceAllocateDuringReplace, canForceAllocatePrimary, canRebalance, canRebalance, canRemain, getForcedInitialShardAllocationToNodes, shouldAutoExpandToNode
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
IndexBalanceAllocationDecider
-
-
Method Details
-
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
-