Interface HsDataView

    • Method Detail

      • consumeBuffer

        Optional<ResultSubpartition.BufferAndBacklog> consumeBuffer​(int nextBufferToConsume,
                                                                    Collection<Buffer> buffersToRecycle)
                                                             throws Throwable
        Try to consume next buffer.

        Only invoked by consumer thread.

        Parameters:
        nextBufferToConsume - next buffer index to consume.
        buffersToRecycle - buffers to recycle if needed.
        Returns:
        If the target buffer does exist, return buffer and next buffer's backlog, otherwise return Optional.empty().
        Throws:
        Throwable
      • peekNextToConsumeDataType

        Buffer.DataType peekNextToConsumeDataType​(int nextBufferToConsume,
                                                  Collection<Buffer> buffersToRecycle)
        Get dataType of next buffer to consume.
        Parameters:
        nextBufferToConsume - next buffer index to consume
        buffersToRecycle - buffers to recycle if needed.
        Returns:
        next buffer's dataType. If not found in memory, return Buffer.DataType.NONE.
      • getBacklog

        int getBacklog()
        Get the number of buffers whose Buffer.DataType is buffer.
        Returns:
        backlog of this view's corresponding subpartition.
      • releaseDataView

        void releaseDataView()
        Release this HsDataView when related subpartition view is releasing.