Interface Operator
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Subinterfaces:
DataSourceOperator,ProcessOperator,SinkOperator,SourceOperator
- All Known Implementing Classes:
AbstractSeriesAggregationScanOperator,AggregationOperator,AlignedSeriesAggregationScanOperator,AlignedSeriesScanOperator,CountMergeOperator,DeviceMergeOperator,DevicesCountOperator,DevicesSchemaScanOperator,DeviceViewOperator,ExchangeOperator,FillOperator,FilterAndProjectOperator,LastCacheScanOperator,LastQueryCollectOperator,LastQueryMergeOperator,LastQueryOperator,LastQuerySortOperator,LevelTimeSeriesCountOperator,LimitOperator,LinearFillOperator,NodeManageMemoryMergeOperator,NodePathsConvertOperator,NodePathsCountOperator,NodePathsSchemaScanOperator,OffsetOperator,PathsUsingTemplateScanOperator,RawDataAggregationOperator,RowBasedTimeJoinOperator,SchemaFetchMergeOperator,SchemaFetchScanOperator,SchemaQueryMergeOperator,SchemaQueryOrderByHeatOperator,SchemaQueryScanOperator,SeriesAggregationScanOperator,SeriesScanOperator,SingleInputAggregationOperator,SlidingWindowAggregationOperator,SortOperator,TimeJoinOperator,TimeSeriesCountOperator,TimeSeriesSchemaScanOperator,TransformOperator,UpdateLastCacheOperator
public interface Operator extends java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.util.concurrent.ListenableFuture<?>NOT_BLOCKED
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longcalculateMaxPeekMemory()We should also consider the memory used by its children operator, so the calculation logic may be like: long estimatedOfCurrentOperator = XXXXX; return max(estimatedOfCurrentOperator, child1.calculateMaxPeekMemory(), child2.calculateMaxPeekMemory(), ....)longcalculateMaxReturnSize()longcalculateRetainedSizeAfterCallingNext()default voidclose()This method will always be called before releasing the Operator reference.OperatorContextgetOperatorContext()booleanhasNext()default com.google.common.util.concurrent.ListenableFuture<?>isBlocked()Returns a future that will be completed when the operator becomes unblocked.booleanisFinished()Is this operator completely finished processing and no more output TsBlock will be produced.org.apache.iotdb.tsfile.read.common.block.TsBlocknext()Gets next tsBlock from this operator.
-
-
-
Method Detail
-
getOperatorContext
OperatorContext getOperatorContext()
-
isBlocked
default com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
Returns a future that will be completed when the operator becomes unblocked. If the operator is not blocked, this method should returnNOT_BLOCKED.
-
next
org.apache.iotdb.tsfile.read.common.block.TsBlock next()
Gets next tsBlock from this operator. If no data is currently available, return null.
-
hasNext
boolean hasNext()
- Returns:
- true if the operator has more data, otherwise false
-
close
default void close() throws java.lang.ExceptionThis method will always be called before releasing the Operator reference.- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
isFinished
boolean isFinished()
Is this operator completely finished processing and no more output TsBlock will be produced.
-
calculateMaxPeekMemory
long calculateMaxPeekMemory()
We should also consider the memory used by its children operator, so the calculation logic may be like: long estimatedOfCurrentOperator = XXXXX; return max(estimatedOfCurrentOperator, child1.calculateMaxPeekMemory(), child2.calculateMaxPeekMemory(), ....)Each operator's MaxPeekMemory should also take retained size of each child operator into account.
- Returns:
- estimated max memory footprint that the Operator Tree(rooted from this operator) will use while doing its own query processing
-
calculateMaxReturnSize
long calculateMaxReturnSize()
- Returns:
- estimated max memory footprint for returned TsBlock when calling operator.next()
-
calculateRetainedSizeAfterCallingNext
long calculateRetainedSizeAfterCallingNext()
- Returns:
- each operator's retained size(including all its children's retained size) after calling its next() method
-
-