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.
rowsEmitted - Total rows emitted by source operators across all drivers.
bytesRead - Total bytes read across all drivers. Includes pre-decompression bytes pulled from external storage by external-source operators, bytes read by Lucene-source and values-source operators on worker threads, and planner-time Lucene directory I/O on the data node SEARCH thread (query rewriting, weight construction, SearchStats field lookups, sort builders, etc.). TODO: Lookup join streaming reads are not included yet here.
readNanos - Total wall time format readers spent reading on producer threads, in nanoseconds. Lucene contributes 0; only external-source operators populate this.
cpuNanos - Total CPU time across all drivers (sum of per-driver CPU time).
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.
capturedSourceMetadata - Per-file flat _stats.* metadata contributions captured during data-node execution and shipped back so the coordinator can merge and enrich its SchemaCacheEntry for the next query. Keyed by file path; the value is the list of contributions from each operator/driver that touched the file (per-chunk for parallel parsing, per-split for macro-splits). The actual merge is intentionally deferred to esql-side consumers because the merge algorithm lives in SourceStatisticsSerializer.mergeStatistics which depends on esql-module types this compute module cannot reach.
partial - Whether any driver returned partial results because a lenient policy dropped data during the read (e.g. a max_record_size truncation under a non-strict error_mode). OR-aggregated across drivers/nodes and consumed by the coordinator to flip the response's is_partial flag — the structured counterpart of the client-visible truncation warning.
All Implemented Interfaces:
Writeable

public record DriverCompletionInfo(long documentsFound, long valuesLoaded, long rowsEmitted, long bytesRead, long readNanos, long cpuNanos, List<DriverProfile> driverProfiles, List<PlanProfile> planProfiles, Map<String,List<Map<String,Object>>> capturedSourceMetadata, boolean partial) 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, long rowsEmitted, long bytesRead, long readNanos, long cpuNanos, List<DriverProfile> driverProfiles, List<PlanProfile> planProfiles, Map<String,List<Map<String,Object>>> capturedSourceMetadata, boolean partial)
      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
      rowsEmitted - the value for the rowsEmitted record component
      bytesRead - the value for the bytesRead record component
      readNanos - the value for the readNanos record component
      cpuNanos - the value for the cpuNanos record component
      driverProfiles - the value for the driverProfiles record component
      planProfiles - the value for the planProfiles record component
      capturedSourceMetadata - the value for the capturedSourceMetadata record component
      partial - the value for the partial record component
  • Method Details

    • includingProfiles

      public static DriverCompletionInfo includingProfiles(List<Driver> drivers, String description, String clusterName, String nodeName, String planTree, String logicalPlanTree, PlanTimeProfile planTimeProfile, long planningBytesRead)
      Build a DriverCompletionInfo for many drivers including their profile output.
      Parameters:
      planningBytesRead - Bytes read on the data node SEARCH thread during planner setup (query rewriting, weight construction, SearchStats lookups, sort builders, etc.) before drivers were dispatched. Added to the aggregate bytesRead.
    • excludingProfiles

      public static DriverCompletionInfo excludingProfiles(List<Driver> drivers, long planningBytesRead)
      Build a DriverCompletionInfo for many drivers excluding their profile output.
      Parameters:
      planningBytesRead - Bytes read on the data node SEARCH thread during planner setup (query rewriting, weight construction, SearchStats lookups, sort builders, etc.) before drivers were dispatched. Added to the aggregate bytesRead.
    • 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
    • rowsEmitted

      public long rowsEmitted()
      Returns the value of the rowsEmitted record component.
      Returns:
      the value of the rowsEmitted record component
    • bytesRead

      public long bytesRead()
      Returns the value of the bytesRead record component.
      Returns:
      the value of the bytesRead record component
    • readNanos

      public long readNanos()
      Returns the value of the readNanos record component.
      Returns:
      the value of the readNanos record component
    • cpuNanos

      public long cpuNanos()
      Returns the value of the cpuNanos record component.
      Returns:
      the value of the cpuNanos 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
    • capturedSourceMetadata

      public Map<String,List<Map<String,Object>>> capturedSourceMetadata()
      Returns the value of the capturedSourceMetadata record component.
      Returns:
      the value of the capturedSourceMetadata record component
    • partial

      public boolean partial()
      Returns the value of the partial record component.
      Returns:
      the value of the partial record component