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 int
REGION_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 boolean
containBuffer(int bufferIndex)
Whether the current region contain the buffer.int
getFirstBufferIndex()
Get the first buffer index of this region.int
getNumBuffers()
Get the number of buffers in this region.long
getRegionEndOffset()
Get the file end offset of the region.long
getRegionStartOffset()
Get the file start offset of this region.int
getSize()
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.Region
Whether the current region contain the buffer.- Specified by:
containBuffer
in 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:
getSize
in interfaceFileDataIndexRegionHelper.Region
-
getRegionStartOffset
public long getRegionStartOffset()
Description copied from interface:FileDataIndexRegionHelper.Region
Get the file start offset of this region.- Specified by:
getRegionStartOffset
in interfaceFileDataIndexRegionHelper.Region
-
getRegionEndOffset
public long getRegionEndOffset()
Description copied from interface:FileDataIndexRegionHelper.Region
Get the file end offset of the region.- Specified by:
getRegionEndOffset
in interfaceFileDataIndexRegionHelper.Region
-
getNumBuffers
public int getNumBuffers()
Description copied from interface:FileDataIndexRegionHelper.Region
Get the number of buffers in this region.- Specified by:
getNumBuffers
in interfaceFileDataIndexRegionHelper.Region
-
getFirstBufferIndex
public int getFirstBufferIndex()
Description copied from interface:FileDataIndexRegionHelper.Region
Get the first buffer index of this region.- Specified by:
getFirstBufferIndex
in interfaceFileDataIndexRegionHelper.Region
-
-