Interface ISinkHandle
-
- All Known Implementing Classes:
LocalSinkHandle,SinkHandle
public interface ISinkHandle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort()Abort the sink handle.voidclose()Close the sink handle.longgetBufferRetainedSizeInBytes()Get the total amount of memory used by buffered tsblocks.org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceIdgetLocalFragmentInstanceId()Get the local fragment instance ID that this sink handle belongs to.booleanisAborted()If the handle is aborted.booleanisFinished()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.voidsend(int partition, java.util.List<org.apache.iotdb.tsfile.read.common.block.TsBlock> tsBlocks)Send aTsBlockto a specific partition.voidsend(org.apache.iotdb.tsfile.read.common.block.TsBlock tsBlock)Send a list of tsblocks to an unpartitioned output buffer.voidsetNoMoreTsBlocks()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. ARuntimeExceptionwill 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 aTsBlockto a specific partition. If no-more-tsblocks has been set, the send tsblock call is ignored. This can happen with limit queries. ARuntimeExceptionwill 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 byisFull().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 byisFull().Should only be called in normal case.
-
-