Module org.elasticsearch.compute
Class TimeSeriesExtractFieldOperator
java.lang.Object
org.elasticsearch.compute.operator.AbstractPageMappingOperator
org.elasticsearch.compute.lucene.read.TimeSeriesExtractFieldOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
A variant of
ValuesSourceReaderOperator for extracting fields in time-series indices. The differences are:
1. Caches all segments of the last shard instead of only the last segment, since data in time-series can come from
any segment at any time
2. Although docs do not arrive in the global order (by shard, then segment, then docId), they are still sorted
within each segment; hence, this reader does not perform sorting and regrouping, which are expensive.
3. For dimension fields, values are read only once per tsid.
These changes are made purely for performance reasons. We should look into consolidating this operator with
ValuesSourceReaderOperator by adding some metadata to the DocVector and handling them accordingly.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.operator.AbstractPageMappingOperator
AbstractPageMappingOperator.StatusNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionTimeSeriesExtractFieldOperator(BlockFactory blockFactory, List<ValuesSourceReaderOperator.FieldInfo> fields, List<? extends ShardContext> shardContexts) -
Method Summary
Methods inherited from class org.elasticsearch.compute.operator.AbstractPageMappingOperator
addInput, finish, getOutput, isFinished, needsInput, status, status
-
Constructor Details
-
TimeSeriesExtractFieldOperator
public TimeSeriesExtractFieldOperator(BlockFactory blockFactory, List<ValuesSourceReaderOperator.FieldInfo> fields, List<? extends ShardContext> shardContexts)
-
-
Method Details
-
process
- Specified by:
processin classAbstractPageMappingOperator
-
toString
- Specified by:
toStringin classAbstractPageMappingOperator
-
close
public void close()Description copied from interface:Operatornotifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperator- Specified by:
closein interfaceorg.elasticsearch.core.Releasable- Overrides:
closein classAbstractPageMappingOperator
-