Search in sources :

Example 1 with MMapMode

use of xerial.larray.mmap.MMapMode in project pinot by linkedin.

the class PinotLByteBuffer method mapFromFileInternal.

private static MMapBuffer mapFromFileInternal(File file, long start, long length, FileChannel.MapMode openMode, String context) throws IOException {
    MMapMode mmapMode = (openMode == FileChannel.MapMode.READ_ONLY) ? MMapMode.READ_ONLY : MMapMode.READ_WRITE;
    // TODO: add memory tracking MMapUtils
    MMapBuffer buf = new MMapBuffer(file, start, length, mmapMode);
    return buf;
}
Also used : MMapBuffer(xerial.larray.mmap.MMapBuffer) MMapMode(xerial.larray.mmap.MMapMode)

Aggregations

MMapBuffer (xerial.larray.mmap.MMapBuffer)1 MMapMode (xerial.larray.mmap.MMapMode)1