Module org.elasticsearch.server
Class WriteLoadConstraintMonitor
java.lang.Object
org.elasticsearch.cluster.routing.allocation.WriteLoadConstraintMonitor
Monitors the node-level write thread pool usage across the cluster and initiates a rebalancing round (via
RerouteService.reroute(java.lang.String, org.elasticsearch.common.Priority, org.elasticsearch.action.ActionListener<java.lang.Void>)) whenever a node crosses the node-level write load thresholds.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWriteLoadConstraintMonitor(ClusterSettings clusterSettings, LongSupplier currentTimeMillisSupplier, Supplier<ClusterState> clusterStateSupplier, RerouteService rerouteService) WriteLoadConstraintMonitor(ClusterSettings clusterSettings, LongSupplier currentTimeMillisSupplier, Supplier<ClusterState> clusterStateSupplier, RerouteService rerouteService, MeterRegistry meterRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidonNewInfo(ClusterInfo clusterInfo) Receives a copy of the latestClusterInfowhenever theClusterInfoServicecollects it.
-
Field Details
-
HOTSPOT_NODES_COUNT_METRIC_NAME
- See Also:
-
HOTSPOT_DURATION_METRIC_NAME
- See Also:
-
-
Constructor Details
-
WriteLoadConstraintMonitor
protected WriteLoadConstraintMonitor(ClusterSettings clusterSettings, LongSupplier currentTimeMillisSupplier, Supplier<ClusterState> clusterStateSupplier, RerouteService rerouteService) -
WriteLoadConstraintMonitor
public WriteLoadConstraintMonitor(ClusterSettings clusterSettings, LongSupplier currentTimeMillisSupplier, Supplier<ClusterState> clusterStateSupplier, RerouteService rerouteService, MeterRegistry meterRegistry)
-
-
Method Details
-
onNewInfo
Receives a copy of the latestClusterInfowhenever theClusterInfoServicecollects it. Processes the newNodeUsageStatsForThreadPoolsand initiates rebalancing, via reroute, if a node in the cluster exceeds thread pool usage thresholds.
-