public class InternalRegionWriteReadUtils extends Object
HsFileDataIndexImpl.InternalRegion.| 构造器和说明 |
|---|
InternalRegionWriteReadUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ByteBuffer |
allocateAndConfigureBuffer(int bufferSize)
Allocate a buffer with specific size and configure it to native order.
|
static org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion |
readRegionFromFile(FileChannel channel,
ByteBuffer headerBuffer,
long position)
Read
HsFileDataIndexImpl.InternalRegion from FileChannel. |
static void |
writeRegionToFile(FileChannel channel,
ByteBuffer headerBuffer,
org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion region)
Write
HsFileDataIndexImpl.InternalRegion to FileChannel. |
public static ByteBuffer allocateAndConfigureBuffer(int bufferSize)
bufferSize - the size of buffer to allocate.public static void writeRegionToFile(FileChannel channel, ByteBuffer headerBuffer, org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion region) throws IOException
HsFileDataIndexImpl.InternalRegion to FileChannel.channel - the file's channel to write.headerBuffer - the buffer to write HsFileDataIndexImpl.InternalRegion's header.region - the region to be written to channel.IOExceptionpublic static org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion readRegionFromFile(FileChannel channel, ByteBuffer headerBuffer, long position) throws IOException
HsFileDataIndexImpl.InternalRegion from FileChannel.channel - the channel to read.headerBuffer - the buffer to read HsFileDataIndexImpl.InternalRegion's header.position - position to start read.HsFileDataIndexImpl.InternalRegion that read from this channel.IOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.