Module org.elasticsearch.compute
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. Exceptnullvalues 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,SearchStatsfield 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 theprofileoption 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 itsSchemaCacheEntryfor 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 inSourceStatisticsSerializer.mergeStatisticswhich 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. amax_record_sizetruncation under a non-stricterror_mode). OR-aggregated across drivers/nodes and consumed by the coordinator to flip the response'sis_partialflag — 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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DriverCompletionInfoCompletion info we use when we didn't properly complete any drivers. -
Constructor Summary
ConstructorsConstructorDescriptionDriverCompletionInfo(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 aDriverCompletionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebytesReadrecord component.Returns the value of thecapturedSourceMetadatarecord component.longcpuNanos()Returns the value of thecpuNanosrecord component.longReturns the value of thedocumentsFoundrecord component.Returns the value of thedriverProfilesrecord component.final booleanIndicates whether some other object is "equal to" this one.static DriverCompletionInfoexcludingProfiles(List<Driver> drivers, long planningBytesRead) Build aDriverCompletionInfofor many drivers excluding their profile output.final inthashCode()Returns a hash code value for this object.static DriverCompletionInfoincludingProfiles(List<Driver> drivers, String description, String clusterName, String nodeName, String planTree, String logicalPlanTree, PlanTimeProfile planTimeProfile, long planningBytesRead) Build aDriverCompletionInfofor many drivers including their profile output.booleanpartial()Returns the value of thepartialrecord component.Returns the value of theplanProfilesrecord component.static DriverCompletionInforeadFrom(StreamInput in) longReturns the value of thereadNanosrecord component.longReturns the value of therowsEmittedrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thevaluesLoadedrecord component.voidwriteTo(StreamOutput out)
-
Field Details
-
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 aDriverCompletionInforecord class.- Parameters:
documentsFound- the value for thedocumentsFoundrecord componentvaluesLoaded- the value for thevaluesLoadedrecord componentrowsEmitted- the value for therowsEmittedrecord componentbytesRead- the value for thebytesReadrecord componentreadNanos- the value for thereadNanosrecord componentcpuNanos- the value for thecpuNanosrecord componentdriverProfiles- the value for thedriverProfilesrecord componentplanProfiles- the value for theplanProfilesrecord componentcapturedSourceMetadata- the value for thecapturedSourceMetadatarecord componentpartial- the value for thepartialrecord 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 aDriverCompletionInfofor many drivers including their profile output.- Parameters:
planningBytesRead- Bytes read on the data node SEARCH thread during planner setup (query rewriting, weight construction,SearchStatslookups, sort builders, etc.) before drivers were dispatched. Added to the aggregatebytesRead.
-
excludingProfiles
Build aDriverCompletionInfofor many drivers excluding their profile output.- Parameters:
planningBytesRead- Bytes read on the data node SEARCH thread during planner setup (query rewriting, weight construction,SearchStatslookups, sort builders, etc.) before drivers were dispatched. Added to the aggregatebytesRead.
-
readFrom
- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
documentsFound
public long documentsFound()Returns the value of thedocumentsFoundrecord component.- Returns:
- the value of the
documentsFoundrecord component
-
valuesLoaded
public long valuesLoaded()Returns the value of thevaluesLoadedrecord component.- Returns:
- the value of the
valuesLoadedrecord component
-
rowsEmitted
public long rowsEmitted()Returns the value of therowsEmittedrecord component.- Returns:
- the value of the
rowsEmittedrecord component
-
bytesRead
public long bytesRead()Returns the value of thebytesReadrecord component.- Returns:
- the value of the
bytesReadrecord component
-
readNanos
public long readNanos()Returns the value of thereadNanosrecord component.- Returns:
- the value of the
readNanosrecord component
-
cpuNanos
public long cpuNanos()Returns the value of thecpuNanosrecord component.- Returns:
- the value of the
cpuNanosrecord component
-
driverProfiles
Returns the value of thedriverProfilesrecord component.- Returns:
- the value of the
driverProfilesrecord component
-
planProfiles
Returns the value of theplanProfilesrecord component.- Returns:
- the value of the
planProfilesrecord component
-
capturedSourceMetadata
Returns the value of thecapturedSourceMetadatarecord component.- Returns:
- the value of the
capturedSourceMetadatarecord component
-
partial
public boolean partial()Returns the value of thepartialrecord component.- Returns:
- the value of the
partialrecord component
-