Module org.elasticsearch.server
Class WriteLoadConstraintDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.WriteLoadConstraintDecider
Decides whether shards can be allocated to cluster nodes, or can remain on cluster nodes, based on the target node's current write thread
pool usage stats and any candidate shard's write load estimate.
-
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.canRemain(IndexMetadata indexMetadata, ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Returns aDecisionwhether the given shard routing can be remain on the given node.static doublestatic booleanmaxShardWriteLoadProportionIsHigh(double maxShardWriteLoadProportion, double maxShardWriteLoadThreshold) static booleannodeIsHotspotting(NodeUsageStatsForThreadPools nodeUsageStatsForThreadPools, TimeValue hotspotQueueLatencyThreshold, double hotspotUtilizationThreshold) Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canAllocateReplicaWhenThereIsRetentionLease, canForceAllocateDuringReplace, canForceAllocatePrimary, canRebalance, canRebalance, getForcedInitialShardAllocationToNodes, shouldAutoExpandToNode
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
WriteLoadConstraintDecider
-
-
Method Details
-
nodeIsHotspotting
public static boolean nodeIsHotspotting(NodeUsageStatsForThreadPools nodeUsageStatsForThreadPools, TimeValue hotspotQueueLatencyThreshold, double hotspotUtilizationThreshold) - Returns:
- Whether a node is currently hotspotting, given the threshold criteria for queue latency and utilization
-
maxShardWriteLoadProportion
-
maxShardWriteLoadProportionIsHigh
public static boolean maxShardWriteLoadProportionIsHigh(double maxShardWriteLoadProportion, double maxShardWriteLoadThreshold) -
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
-
canRemain
public Decision canRemain(IndexMetadata indexMetadata, ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) Description copied from class:AllocationDeciderReturns aDecisionwhether the given shard routing can be remain on the given node. The default isDecision.ALWAYS.- Overrides:
canRemainin classAllocationDecider
-