Class DiskIOScheduler
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.tier.disk.DiskIOScheduler
-
- All Implemented Interfaces:
Runnable,BufferRecycler,NettyServiceProducer
public class DiskIOScheduler extends Object implements Runnable, BufferRecycler, NettyServiceProducer
TheDiskIOScheduleris a scheduler that controls the reading of data from shuffle files. It ensures the correct order of buffers in each subpartition during file reading. The scheduler implements theNettyServiceProducerinterface to send the buffers to the Netty server through theNettyConnectionWriter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.network.buffer.BufferRecycler
BufferRecycler.DummyBufferRecycler
-
-
Constructor Summary
Constructors Constructor Description DiskIOScheduler(TieredStoragePartitionId partitionId, BatchShuffleReadBufferPool bufferPool, ScheduledExecutorService ioExecutor, int maxRequestedBuffers, Duration bufferRequestTimeout, BiFunction<Integer,Integer,Integer> segmentIdGetter, PartitionFileReader partitionFileReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectionBroken(NettyConnectionId id)NettyConnectionWriterrelated to a connection id will be notified when the netty connection is broken.voidconnectionEstablished(TieredStorageSubpartitionId subpartitionId, NettyConnectionWriter nettyConnectionWriter)NettyConnectionWriterwill be created when a netty connection is established for a subpartition.voidrecycle(org.apache.flink.core.memory.MemorySegment segment)Recycles theMemorySegmentto its originalBufferPoolinstance.voidrelease()voidrun()
-
-
-
Constructor Detail
-
DiskIOScheduler
public DiskIOScheduler(TieredStoragePartitionId partitionId, BatchShuffleReadBufferPool bufferPool, ScheduledExecutorService ioExecutor, int maxRequestedBuffers, Duration bufferRequestTimeout, BiFunction<Integer,Integer,Integer> segmentIdGetter, PartitionFileReader partitionFileReader)
-
-
Method Detail
-
connectionEstablished
public void connectionEstablished(TieredStorageSubpartitionId subpartitionId, NettyConnectionWriter nettyConnectionWriter)
Description copied from interface:NettyServiceProducerNettyConnectionWriterwill be created when a netty connection is established for a subpartition.- Specified by:
connectionEstablishedin interfaceNettyServiceProducer- Parameters:
subpartitionId- subpartition id indicates the id of subpartition.nettyConnectionWriter- writer is used to write buffers to netty connection.
-
connectionBroken
public void connectionBroken(NettyConnectionId id)
Description copied from interface:NettyServiceProducerNettyConnectionWriterrelated to a connection id will be notified when the netty connection is broken.- Specified by:
connectionBrokenin interfaceNettyServiceProducer- Parameters:
id- connection id is the id of connection.
-
recycle
public void recycle(org.apache.flink.core.memory.MemorySegment segment)
Description copied from interface:BufferRecyclerRecycles theMemorySegmentto its originalBufferPoolinstance.- Specified by:
recyclein interfaceBufferRecycler- Parameters:
segment- The memory segment to be recycled.
-
release
public void release()
-
-