Interface ISinkHandle

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void abort()
      Abort the sink handle.
      void close()
      Close the sink handle.
      long getBufferRetainedSizeInBytes()
      Get the total amount of memory used by buffered tsblocks.
      org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId getLocalFragmentInstanceId()
      Get the local fragment instance ID that this sink handle belongs to.
      boolean isAborted()
      If the handle is aborted.
      boolean isFinished()
      If there are no more tsblocks to be sent and all the tsblocks have been fetched by downstream fragment instances.
      com.google.common.util.concurrent.ListenableFuture<?> isFull()
      Get a future that will be completed when the output buffer is not full.
      void send​(int partition, java.util.List<org.apache.iotdb.tsfile.read.common.block.TsBlock> tsBlocks)
      Send a TsBlock to a specific partition.
      void send​(org.apache.iotdb.tsfile.read.common.block.TsBlock tsBlock)
      Send a list of tsblocks to an unpartitioned output buffer.
      void setNoMoreTsBlocks()
      Notify the handle that there are no more tsblocks.
    • Method Detail

      • getLocalFragmentInstanceId

        org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId getLocalFragmentInstanceId()
        Get the local fragment instance ID that this sink handle belongs to.
      • getBufferRetainedSizeInBytes

        long getBufferRetainedSizeInBytes()
        Get the total amount of memory used by buffered tsblocks.
      • isFull

        com.google.common.util.concurrent.ListenableFuture<?> isFull()
        Get a future that will be completed when the output buffer is not full.
      • send

        void send​(org.apache.iotdb.tsfile.read.common.block.TsBlock tsBlock)
        Send a list of tsblocks to an unpartitioned output buffer. If no-more-tsblocks has been set, the invocation will be ignored. This can happen with limit queries. A RuntimeException will be thrown if any exception happened during the data transmission.
      • send

        void send​(int partition,
                  java.util.List<org.apache.iotdb.tsfile.read.common.block.TsBlock> tsBlocks)
        Send a TsBlock to a specific partition. If no-more-tsblocks has been set, the send tsblock call is ignored. This can happen with limit queries. A RuntimeException will be thrown if any exception happened * during the data transmission.
      • setNoMoreTsBlocks

        void setNoMoreTsBlocks()
        Notify the handle that there are no more tsblocks. Any future calls to send a tsblock should be ignored.
      • isAborted

        boolean isAborted()
        If the handle is aborted.
      • isFinished

        boolean isFinished()
        If there are no more tsblocks to be sent and all the tsblocks have been fetched by downstream fragment instances.
      • abort

        void abort()
        Abort the sink handle. Discard all tsblocks which may still be in the memory buffer and cancel the future returned by isFull().

        Should only be called in abnormal case

      • close

        void close()
        Close the sink handle. Discard all tsblocks which may still be in the memory buffer and complete the future returned by isFull().

        Should only be called in normal case.