Class ResponseCollectorService

org.elasticsearch.node.ResponseCollectorService
All Implemented Interfaces:
ClusterStateListener

public final class ResponseCollectorService extends implements 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.
  • Field Details

    • ALPHA

      public static final double ALPHA
      The weight parameter used for all moving averages of parameters.
      See Also:
      Constant Field Values
  • Constructor Details

    • ResponseCollectorService

      public ResponseCollectorService(ClusterService clusterService)
  • Method Details

    • clusterChanged

      public void clusterChanged(ClusterChangedEvent event)
      Description copied from interface: ClusterStateListener
      Called when cluster state changes.
      Specified by:
      clusterChanged in interface ClusterStateListener
    • addNodeStatistics

      public void addNodeStatistics( nodeId, int queueSize, long responseTimeNanos, long avgServiceTimeNanos)
    • getAllNodeStatistics

      public <,​ResponseCollectorService.ComputedNodeStats> getAllNodeStatistics()
    • getAdaptiveStats

      public <,​> clientSearchConnections)
    • getNodeStatistics

      public < nodeId)
      Optionally return a NodeStatistics for the given nodeid, if response information exists for the given node. Returns an empty Optional if the node was not found.