public interface TierConsumerAgent
TierConsumerAgent is the consumer agent of each tier in tiered store, which could
read data from responding tier.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the consumer agent.
|
Optional<Buffer> |
getNextBuffer(TieredStoragePartitionId partitionId,
TieredStorageSubpartitionId subpartitionId,
int segmentId)
Get buffer from the consumer agent.
|
int |
peekNextBufferSubpartitionId(TieredStoragePartitionId partitionId,
ResultSubpartitionIndexSet indexSet)
Returns the index of the subpartition where the next buffer locates, or -1 if there is no
buffer available or the subpartition index does not belong to the specified indexSet.
|
void |
registerAvailabilityNotifier(AvailabilityNotifier notifier)
Register the notifier to notify the availability of a subpartition.
|
void |
start()
Start the consumer agent.
|
void start()
int peekNextBufferSubpartitionId(TieredStoragePartitionId partitionId, ResultSubpartitionIndexSet indexSet) throws IOException
partitionId - The index of the partition which the returned subpartition should belong
to.indexSet - The indexes of the subpartitions expected.IOExceptionOptional<Buffer> getNextBuffer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId, int segmentId)
partitionId - the id of partition.subpartitionId - the id of subpartition.segmentId - the id of segment.void registerAvailabilityNotifier(AvailabilityNotifier notifier)
notifier - to notify availability.void close()
throws IOException
IOExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.