java.lang.Object
org.elasticsearch.node.ResponseCollectorService
- All Implemented Interfaces:
ClusterStateListener
Collects statistics about queue size, response time, and service time of
tasks executed on each node, making the EWMA of the values available to the
coordinating node.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStruct-like class encapsulating a point-in-time snapshot of a particular node's statistics. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe weight parameter used for all moving averages of parameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNodeStatistics(String nodeId, int queueSize, long responseTimeNanos, long avgServiceTimeNanos) voidCalled when cluster state changes.getAdaptiveStats(Map<String, Long> clientSearchConnections) getNodeStatistics(String nodeId) Optionally return aNodeStatisticsfor the given nodeid, if response information exists for the given node.
-
Field Details
-
ALPHA
public static final double ALPHAThe weight parameter used for all moving averages of parameters.- See Also:
-
-
Constructor Details
-
ResponseCollectorService
-
-
Method Details
-
clusterChanged
Description copied from interface:ClusterStateListenerCalled when cluster state changes.Cluster states are applied one-by-one which means they can be a performance bottleneck. Implementations of this method should therefore be fast, so please consider forking work into the background rather than doing everything inline.
- Specified by:
clusterChangedin interfaceClusterStateListener
-
addNodeStatistics
public void addNodeStatistics(String nodeId, int queueSize, long responseTimeNanos, long avgServiceTimeNanos) -
getAllNodeStatistics
-
getAdaptiveStats
-
getNodeStatistics
Optionally return aNodeStatisticsfor the given nodeid, if response information exists for the given node. Returns an emptyOptionalif the node was not found.
-