Record Class DriverCompletionInfo

java.lang.Object
java.lang.Record
org.elasticsearch.compute.operator.DriverCompletionInfo
Record Components:
documentsFound - The number of documents found by all lucene queries performed by these drivers.
valuesLoaded - The number of values loaded from lucene for all drivers. This is roughly the number of documents times the number of fields per document. Except null values don't count. And multivalued fields count as many times as there are values.
driverProfiles - DriverProfiles from each driver. These are fairly cheap to build but not free so this will be empty if the profile option was not set in the request.
All Implemented Interfaces:
Writeable

public record DriverCompletionInfo(long documentsFound, long valuesLoaded, List<DriverProfile> driverProfiles, List<PlanProfile> planProfiles) extends Record implements Writeable
Information returned when one of more Drivers is completed.
  • Field Details

    • EMPTY

      public static final DriverCompletionInfo EMPTY
      Completion info we use when we didn't properly complete any drivers. Usually this is returned with an error, but it's also used when receiving responses from very old nodes.
  • Constructor Details

    • DriverCompletionInfo

      public DriverCompletionInfo(long documentsFound, long valuesLoaded, List<DriverProfile> driverProfiles, List<PlanProfile> planProfiles)
      Creates an instance of a DriverCompletionInfo record class.
      Parameters:
      documentsFound - the value for the documentsFound record component
      valuesLoaded - the value for the valuesLoaded record component
      driverProfiles - the value for the driverProfiles record component
      planProfiles - the value for the planProfiles record component
  • Method Details

    • includingProfiles

      public static DriverCompletionInfo includingProfiles(List<Driver> drivers, String description, String clusterName, String nodeName, String planTree)
      Build a DriverCompletionInfo for many drivers including their profile output.
    • excludingProfiles

      public static DriverCompletionInfo excludingProfiles(List<Driver> drivers)
      Build a DriverCompletionInfo for many drivers excluding their profile output.
    • readFrom

      public static DriverCompletionInfo readFrom(StreamInput in) throws IOException
      Throws:
      IOException
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • documentsFound

      public long documentsFound()
      Returns the value of the documentsFound record component.
      Returns:
      the value of the documentsFound record component
    • valuesLoaded

      public long valuesLoaded()
      Returns the value of the valuesLoaded record component.
      Returns:
      the value of the valuesLoaded record component
    • driverProfiles

      public List<DriverProfile> driverProfiles()
      Returns the value of the driverProfiles record component.
      Returns:
      the value of the driverProfiles record component
    • planProfiles

      public List<PlanProfile> planProfiles()
      Returns the value of the planProfiles record component.
      Returns:
      the value of the planProfiles record component