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 -
Constructor Summary
ConstructorsConstructorDescriptionFixedSizeRegion(int firstBufferIndex, long regionStartOffset, long regionEndOffset, int numBuffers) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainBuffer(int bufferIndex) Whether the current region contain the buffer.intGet the first buffer index of this region.intGet the number of buffers in this region.longGet the file end offset of the region.longGet the file start offset of this region.intgetSize()Get the total size in bytes of this region, including the fields and the buffers.
-
Field Details
-
REGION_SIZE
public static final int REGION_SIZE- See Also:
-
-
Constructor Details
-
FixedSizeRegion
public FixedSizeRegion(int firstBufferIndex, long regionStartOffset, long regionEndOffset, int numBuffers)
-
-
Method Details
-
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
-