public static interface FileDataIndexRegionHelper.Region
FileDataIndexRegionHelper.Region
Represents a series of buffers that are:
The following example illustrates some physically continuous buffers in a file and regions upon them, where `x-y` denotes buffer from subpartition x with buffer index y, and `()` denotes a region.
(1-1, 1-2), (2-1), (2-2, 2-3), (1-5, 1-6), (1-4)
Note: The file may not contain all the buffers. E.g., 1-3 is missing in the above example.
Note: Buffers in file may have different orders than their buffer index. E.g., 1-4 comes after 1-6 in the above example.
Note: This index may not always maintain the longest possible regions. E.g., 2-1, 2-2, 2-3 are in two separate regions.
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.
|
int |
getSize()
Get the total size in bytes of this region, including the fields and the buffers.
|
int getSize()
int getFirstBufferIndex()
long getRegionStartOffset()
long getRegionEndOffset()
int getNumBuffers()
boolean containBuffer(int bufferIndex)
bufferIndex
- the specific buffer indexCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.