Class HsFileDataIndexImpl.InternalRegion
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion
-
- All Implemented Interfaces:
FileDataIndexRegionHelper.Region
- Enclosing class:
- HsFileDataIndexImpl
public static class HsFileDataIndexImpl.InternalRegion extends Object implements FileDataIndexRegionHelper.Region
AHsFileDataIndexImpl.InternalRegionis an implementation ofFileDataIndexRegionHelper.Region. Note that this class introduced a new field to indicate whether each buffer in the region is released.
-
-
Field Summary
Fields Modifier and Type Field Description static intHEADER_SIZEHsFileDataIndexImpl.InternalRegionis consists of header and payload.
-
Constructor Summary
Constructors Constructor Description InternalRegion(int firstBufferIndex, long regionFileOffset, int numBuffers, boolean[] released)
-
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.boolean[]getReleased()intgetSize()Get the total size in bytes of this region, including the fields and the buffers.
-
-
-
Field Detail
-
HEADER_SIZE
public static final int HEADER_SIZE
HsFileDataIndexImpl.InternalRegionis consists of header and payload. (firstBufferIndex, firstBufferOffset, numBuffer) are immutable header part that have fixed size. The array of released is variable payload. This field represents the size of header.- 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()
Description copied from interface:FileDataIndexRegionHelper.RegionGet the total size in bytes of this region, including the fields and the buffers.- Specified by:
getSizein interfaceFileDataIndexRegionHelper.Region
-
getFirstBufferIndex
public int getFirstBufferIndex()
Description copied from interface:FileDataIndexRegionHelper.RegionGet the first buffer index of this region.- Specified by:
getFirstBufferIndexin 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
-
getReleased
public boolean[] getReleased()
-
-