public static class HsFileDataIndexImpl.InternalRegion extends Object implements FileDataIndexRegionHelper.Region
HsFileDataIndexImpl.InternalRegion is an implementation of FileDataIndexRegionHelper.Region.
Note that this class introduced a new field to indicate whether each buffer in the region is
released.| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_SIZE
HsFileDataIndexImpl.InternalRegion is consists of header and payload. |
| Constructor and Description |
|---|
InternalRegion(int firstBufferIndex,
long regionFileOffset,
int numBuffers,
boolean[] released) |
| Modifier and Type | Method and 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.
|
boolean[] |
getReleased() |
int |
getSize()
Get the total size in bytes of this region, including the fields and the buffers.
|
public static final int HEADER_SIZE
HsFileDataIndexImpl.InternalRegion is 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.public InternalRegion(int firstBufferIndex,
long regionFileOffset,
int numBuffers,
boolean[] released)
public boolean containBuffer(int bufferIndex)
FileDataIndexRegionHelper.RegioncontainBuffer in interface FileDataIndexRegionHelper.RegionbufferIndex - the specific buffer indexpublic int getSize()
FileDataIndexRegionHelper.RegiongetSize in interface FileDataIndexRegionHelper.Regionpublic int getFirstBufferIndex()
FileDataIndexRegionHelper.RegiongetFirstBufferIndex in interface FileDataIndexRegionHelper.Regionpublic long getRegionStartOffset()
FileDataIndexRegionHelper.RegiongetRegionStartOffset in interface FileDataIndexRegionHelper.Regionpublic long getRegionEndOffset()
FileDataIndexRegionHelper.RegiongetRegionEndOffset in interface FileDataIndexRegionHelper.Regionpublic int getNumBuffers()
FileDataIndexRegionHelper.RegiongetNumBuffers in interface FileDataIndexRegionHelper.Regionpublic boolean[] getReleased()
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.