Class HsFileDataManager
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataManager
-
- All Implemented Interfaces:
Runnable,BufferRecycler
@ThreadSafe public class HsFileDataManager extends Object implements Runnable, BufferRecycler
File data manager for HsResultPartition, which schedulesHsSubpartitionFileReaderImplfor loading data w.r.t. their offset in the file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.network.buffer.BufferRecycler
BufferRecycler.DummyBufferRecycler
-
-
Constructor Summary
Constructors Constructor Description HsFileDataManager(BatchShuffleReadBufferPool bufferPool, ScheduledExecutorService ioExecutor, HsFileDataIndex dataIndex, Path dataFilePath, HsSubpartitionFileReader.Factory fileReaderFactory, HybridShuffleConfiguration hybridShuffleConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseDataIndexAndDeleteShuffleFile()voidrecycle(org.apache.flink.core.memory.MemorySegment segment)Recycles theMemorySegmentto its originalBufferPoolinstance.HsDataViewregisterNewConsumer(int subpartitionId, HsConsumerId consumerId, HsSubpartitionConsumerInternalOperations operation)This method only called by result partition to create subpartitionFileReader.voidrelease()Releases this file data manager and delete shuffle data after all readers is removed.voidreleaseSubpartitionReader(HsSubpartitionFileReader subpartitionFileReader)Release specificHsSubpartitionFileReaderfromHsFileDataManager.voidrun()voidsetup()Setup read buffer pool.
-
-
-
Constructor Detail
-
HsFileDataManager
public HsFileDataManager(BatchShuffleReadBufferPool bufferPool, ScheduledExecutorService ioExecutor, HsFileDataIndex dataIndex, Path dataFilePath, HsSubpartitionFileReader.Factory fileReaderFactory, HybridShuffleConfiguration hybridShuffleConfiguration)
-
-
Method Detail
-
setup
public void setup()
Setup read buffer pool.
-
registerNewConsumer
public HsDataView registerNewConsumer(int subpartitionId, HsConsumerId consumerId, HsSubpartitionConsumerInternalOperations operation) throws IOException
This method only called by result partition to create subpartitionFileReader.- Throws:
IOException
-
closeDataIndexAndDeleteShuffleFile
public void closeDataIndexAndDeleteShuffleFile()
-
releaseSubpartitionReader
public void releaseSubpartitionReader(HsSubpartitionFileReader subpartitionFileReader)
Release specificHsSubpartitionFileReaderfromHsFileDataManager.- Parameters:
subpartitionFileReader- to release.
-
release
public void release()
Releases this file data manager and delete shuffle data after all readers is removed.
-
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.
-
-