public interface FileDataIndexRegionHelper<T extends FileDataIndexRegionHelper.Region>
FileDataIndexRegionHelper is responsible for writing a FileDataIndexRegionHelper.Region to the file or
reading a FileDataIndexRegionHelper.Region from file.| Modifier and Type | Interface and Description |
|---|---|
static interface |
FileDataIndexRegionHelper.Region
A
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
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. |
| Modifier and Type | Method and Description |
|---|---|
T |
readRegionFromFile(FileChannel channel,
long fileOffset)
Read a region from the file.
|
void |
writeRegionToFile(FileChannel channel,
T region)
Write the region to the file.
|
void writeRegionToFile(FileChannel channel, T region) throws IOException
channel - the file channel to write the regionregion - the region to be written to the fileIOExceptionT readRegionFromFile(FileChannel channel, long fileOffset) throws IOException
channel - the file channel to read the regionfileOffset - the current region data is from this file offset, so start reading the file
from the offset when reading the regionIOExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.