java.lang.Object
org.opensearch.core.transport.TransportMessage
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, TaskAwareRequest

public class TopQueriesRequest extends BaseNodesRequest<TopQueriesRequest>
A request to get cluster/node level top queries information.
Opensearch.internal:
  • Constructor Details

    • TopQueriesRequest

      public TopQueriesRequest(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Constructor for TopQueriesRequest
      Parameters:
      in - A StreamInput object.
      Throws:
      IOException - if the stream cannot be deserialized.
    • TopQueriesRequest

      public TopQueriesRequest(MetricType metricType, String... nodesIds)
      Get top queries from nodes based on the nodes ids specified. If none are passed, cluster level top queries will be returned.
      Parameters:
      metricType - MetricType
      nodesIds - the nodeIds specified in the request
  • Method Details

    • getMetricType

      public MetricType getMetricType()
      Get the type of requested metrics
    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class BaseNodesRequest<TopQueriesRequest>
      Throws:
      IOException