Class TieredStorageConsumerClient
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.storage.TieredStorageConsumerClient
-
public class TieredStorageConsumerClient extends Object
TieredStorageConsumerClientis used to read buffer from tiered store.
-
-
Constructor Summary
Constructors Constructor Description TieredStorageConsumerClient(List<TierFactory> tierFactories, List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs, List<List<TierShuffleDescriptor>> tierShuffleDescriptors, TieredStorageNettyService nettyService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Optional<Buffer>getNextBuffer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId)intpeekNextBufferSubpartitionId(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.voidregisterAvailabilityNotifier(AvailabilityNotifier notifier)voidsetup(BufferPool bufferPool)voidstart()voidupdateTierShuffleDescriptors(TieredStoragePartitionId partitionId, TieredStorageInputChannelId inputChannelId, TieredStorageSubpartitionId subpartitionId, List<TierShuffleDescriptor> tierShuffleDescriptors)
-
-
-
Constructor Detail
-
TieredStorageConsumerClient
public TieredStorageConsumerClient(List<TierFactory> tierFactories, List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs, List<List<TierShuffleDescriptor>> tierShuffleDescriptors, TieredStorageNettyService nettyService)
-
-
Method Detail
-
setup
public void setup(BufferPool bufferPool)
-
start
public void start()
-
peekNextBufferSubpartitionId
public int peekNextBufferSubpartitionId(TieredStoragePartitionId partitionId, ResultSubpartitionIndexSet indexSet) throws IOException
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.- Parameters:
partitionId- The index of the partition which the returned subpartition should belong to.indexSet- The indexes of the subpartitions expected.- Throws:
IOException
-
getNextBuffer
public Optional<Buffer> getNextBuffer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId) throws IOException
- Throws:
IOException
-
registerAvailabilityNotifier
public void registerAvailabilityNotifier(AvailabilityNotifier notifier)
-
updateTierShuffleDescriptors
public void updateTierShuffleDescriptors(TieredStoragePartitionId partitionId, TieredStorageInputChannelId inputChannelId, TieredStorageSubpartitionId subpartitionId, List<TierShuffleDescriptor> tierShuffleDescriptors)
-
close
public void close() throws IOException- Throws:
IOException
-
-