Class ProducerMergedPartitionFileIndex.FixedSizeRegion
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.file.ProducerMergedPartitionFileIndex.FixedSizeRegion
-
- All Implemented Interfaces:
FileDataIndexRegionHelper.Region
- Enclosing class:
- ProducerMergedPartitionFileIndex
public static class ProducerMergedPartitionFileIndex.FixedSizeRegion extends Object implements FileDataIndexRegionHelper.Region
Represents a series of buffers that are:- From the same subpartition
- Logically (i.e. buffer index) consecutive
- Physically (i.e. offset in the file) consecutive
Note that the region has a fixed size.
-
-
Field Summary
Fields Modifier and Type Field Description static intREGION_SIZE
-
Constructor Summary
Constructors Constructor Description FixedSizeRegion(int firstBufferIndex, long regionStartOffset, long regionEndOffset, int numBuffers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainBuffer(int bufferIndex)Whether the current region contain the buffer.intgetFirstBufferIndex()Get the first buffer index of this region.intgetNumBuffers()Get the number of buffers in this region.longgetRegionEndOffset()Get the file end offset of the region.longgetRegionStartOffset()Get the file start offset of this region.intgetSize()Get the total size in bytes of this region, including the fields and the buffers.
-
-
-
Field Detail
-
REGION_SIZE
public static final int REGION_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
containBuffer
public boolean containBuffer(int bufferIndex)
Description copied from interface:FileDataIndexRegionHelper.RegionWhether the current region contain the buffer.- Specified by:
containBufferin interfaceFileDataIndexRegionHelper.Region- Parameters:
bufferIndex- the specific buffer index
-
getSize
public int getSize()
Get the total size in bytes of this region, including the fields and the buffers.- Specified by:
getSizein interfaceFileDataIndexRegionHelper.Region
-
getRegionStartOffset
public long getRegionStartOffset()
Description copied from interface:FileDataIndexRegionHelper.RegionGet the file start offset of this region.- Specified by:
getRegionStartOffsetin interfaceFileDataIndexRegionHelper.Region
-
getRegionEndOffset
public long getRegionEndOffset()
Description copied from interface:FileDataIndexRegionHelper.RegionGet the file end offset of the region.- Specified by:
getRegionEndOffsetin interfaceFileDataIndexRegionHelper.Region
-
getNumBuffers
public int getNumBuffers()
Description copied from interface:FileDataIndexRegionHelper.RegionGet the number of buffers in this region.- Specified by:
getNumBuffersin interfaceFileDataIndexRegionHelper.Region
-
getFirstBufferIndex
public int getFirstBufferIndex()
Description copied from interface:FileDataIndexRegionHelper.RegionGet the first buffer index of this region.- Specified by:
getFirstBufferIndexin interfaceFileDataIndexRegionHelper.Region
-
-