Interface Operator

    • 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
      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(), ....)
      long calculateMaxReturnSize()  
      long calculateRetainedSizeAfterCallingNext()  
      default void close()
      This method will always be called before releasing the Operator reference.
      OperatorContext getOperatorContext()  
      boolean hasNext()  
      default com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
      Returns a future that will be completed when the operator becomes unblocked.
      boolean isFinished()
      Is this operator completely finished processing and no more output TsBlock will be produced.
      org.apache.iotdb.tsfile.read.common.block.TsBlock next()
      Gets next tsBlock from this operator.
    • Field Detail

      • NOT_BLOCKED

        static final com.google.common.util.concurrent.ListenableFuture<?> NOT_BLOCKED
    • Method Detail

      • 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 return NOT_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.Exception
        This method will always be called before releasing the Operator reference.
        Specified by:
        close in interface java.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