public class SeekableFileChannelInputView extends AbstractPagedInputView
DataInputView that is backed by a BlockChannelReader, making it effectively a data input stream. The view reads it data in blocks
from the underlying channel. The view can read data that has been written by a FileChannelOutputView, or that was written in blocks in another fashion.headerLength| 构造器和说明 |
|---|
SeekableFileChannelInputView(IOManager ioManager,
FileIOChannel.ID channelId,
MemoryManager memManager,
List<org.apache.flink.core.memory.MemorySegment> memory,
int sizeOfLastBlock) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
closeAndDelete() |
protected int |
getLimitForSegment(org.apache.flink.core.memory.MemorySegment segment)
Gets the limit for reading bytes from the given memory segment.
|
protected org.apache.flink.core.memory.MemorySegment |
nextSegment(org.apache.flink.core.memory.MemorySegment current)
The method by which concrete subclasses realize page crossing.
|
void |
seek(long position) |
advance, clear, doAdvance, getCurrentPositionInSegment, getCurrentSegment, getCurrentSegmentLimit, getHeaderLength, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seekInput, skipBytes, skipBytesToReadpublic SeekableFileChannelInputView(IOManager ioManager, FileIOChannel.ID channelId, MemoryManager memManager, List<org.apache.flink.core.memory.MemorySegment> memory, int sizeOfLastBlock) throws IOException
IOExceptionpublic void seek(long position)
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void closeAndDelete()
throws IOException
IOExceptionprotected org.apache.flink.core.memory.MemorySegment nextSegment(org.apache.flink.core.memory.MemorySegment current)
throws IOException
AbstractPagedInputViewEOFException.nextSegment 在类中 AbstractPagedInputViewcurrent - The current page that was read to its limit. May be null, if this
method is invoked for the first time.null. If the
input is exhausted, an EOFException must be thrown instead.EOFException - Thrown, if no further segment is available.IOException - Thrown, if the method cannot provide the next page due to an I/O related
problem.protected int getLimitForSegment(org.apache.flink.core.memory.MemorySegment segment)
AbstractPagedInputViewgetLimitForSegment 在类中 AbstractPagedInputViewsegment - The segment to determine the limit for.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.