Package org.elasticsearch.node
Class ResponseCollectorService
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
Modifier and TypeClassDescriptionstatic class
Struct-like class encapsulating a point-in-time snapshot of a particular node's statistics. -
Field Summary
Modifier and TypeFieldDescriptionstatic double
The weight parameter used for all moving averages of parameters. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNodeStatistics(String nodeId, int queueSize, long responseTimeNanos, long avgServiceTimeNanos)
void
Called when cluster state changes.getAdaptiveStats(Map<String,Long> clientSearchConnections)
getNodeStatistics(String nodeId)
Optionally return aNodeStatistics
for 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:
- Constant Field Values
-
-
Constructor Details
-
ResponseCollectorService
-
-
Method Details
-
clusterChanged
Description copied from interface:ClusterStateListener
Called when cluster state changes.- Specified by:
clusterChanged
in interfaceClusterStateListener
-
addNodeStatistics
public void addNodeStatistics(String nodeId, int queueSize, long responseTimeNanos, long avgServiceTimeNanos) -
getAllNodeStatistics
-
getAdaptiveStats
-
getNodeStatistics
Optionally return aNodeStatistics
for the given nodeid, if response information exists for the given node. Returns an emptyOptional
if the node was not found.
-