public class DiskTierConsumerAgent extends Object implements TierConsumerAgent
| 构造器和说明 |
|---|
DiskTierConsumerAgent(List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs,
TieredStorageNettyService nettyService) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
setup(TieredStorageMemoryManager memoryManager)
The consumer agent may request buffers from the memory manager.
|
void |
start()
Start the consumer agent.
|
void |
updateTierShuffleDescriptor(TieredStoragePartitionId partitionId,
TieredStorageInputChannelId inputChannelId,
TieredStorageSubpartitionId subpartitionId,
TierShuffleDescriptor tierShuffleDescriptor)
Update the
TierShuffleDescriptor for the consumer agent. |
public DiskTierConsumerAgent(List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs, TieredStorageNettyService nettyService)
public void setup(TieredStorageMemoryManager memoryManager)
TierConsumerAgentTieredStorageMemoryManager should be integrated into the tier consumer agent. Since the
buffer pool is initialized after the creation of the client, the memory manager need to be
assigned after the buffer pool becomes available.setup 在接口中 TierConsumerAgentpublic void start()
TierConsumerAgentstart 在接口中 TierConsumerAgentpublic void registerAvailabilityNotifier(AvailabilityNotifier notifier)
TierConsumerAgentregisterAvailabilityNotifier 在接口中 TierConsumerAgentnotifier - to notify availability.public void updateTierShuffleDescriptor(TieredStoragePartitionId partitionId, TieredStorageInputChannelId inputChannelId, TieredStorageSubpartitionId subpartitionId, TierShuffleDescriptor tierShuffleDescriptor)
TierConsumerAgentTierShuffleDescriptor for the consumer agent.updateTierShuffleDescriptor 在接口中 TierConsumerAgentpublic int peekNextBufferSubpartitionId(TieredStoragePartitionId partitionId, ResultSubpartitionIndexSet indexSet) throws IOException
TierConsumerAgentpeekNextBufferSubpartitionId 在接口中 TierConsumerAgentpartitionId - The index of the partition which the returned subpartition should belong
to.indexSet - The indexes of the subpartitions expected.IOExceptionpublic Optional<Buffer> getNextBuffer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId, int segmentId)
TierConsumerAgentgetNextBuffer 在接口中 TierConsumerAgentpartitionId - the id of partition.subpartitionId - the id of subpartition.segmentId - the id of segment.public void close()
throws IOException
TierConsumerAgentclose 在接口中 TierConsumerAgentIOExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.