Interface HsSubpartitionFileReader
-
- All Superinterfaces:
Comparable<HsSubpartitionFileReader>,HsDataView
- All Known Implementing Classes:
HsSubpartitionFileReaderImpl
public interface HsSubpartitionFileReader extends Comparable<HsSubpartitionFileReader>, HsDataView
This component is responsible for reading data from disk for a specific subpartition.In order to access the disk as sequentially as possible
HsSubpartitionFileReaderneed to be able to compare priorities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHsSubpartitionFileReader.FactoryFactory to createHsSubpartitionFileReader.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfail(Throwable failureCause)Fail thisHsSubpartitionFileReadercaused by failureCause.voidprepareForScheduling()Do prep work before thisHsSubpartitionFileReaderis scheduled to read data.voidreadBuffers(Queue<org.apache.flink.core.memory.MemorySegment> buffers, BufferRecycler recycler)Read data from disk.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.apache.flink.runtime.io.network.partition.hybrid.HsDataView
consumeBuffer, getBacklog, peekNextToConsumeDataType, releaseDataView
-
-
-
-
Method Detail
-
prepareForScheduling
void prepareForScheduling()
Do prep work before thisHsSubpartitionFileReaderis scheduled to read data.
-
readBuffers
void readBuffers(Queue<org.apache.flink.core.memory.MemorySegment> buffers, BufferRecycler recycler) throws IOException
Read data from disk.- Parameters:
buffers- for reading, note that the ownership of the buffer taken out from the queue is transferred to this class, and the unused buffer must be returned.recycler- to return buffer to read buffer pool.- Throws:
IOException
-
fail
void fail(Throwable failureCause)
Fail thisHsSubpartitionFileReadercaused by failureCause.- Parameters:
failureCause- represents the reason why it failed.
-
-