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
Nested ClassesModifier and TypeClassDescriptionstatic classStruct-like class encapsulating a point-in-time snapshot of a particular node's statistics. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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:
- Constant Field Values
-
-
Constructor Details
-
ResponseCollectorService
-
-
Method Details
-
clusterChanged
Description copied from interface:ClusterStateListenerCalled when cluster state changes.- 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.
-