public class ChannelReaderInputView extends AbstractPagedInputView
DataInputView that is backed by a BufferFileReader, making it effectively a
data input stream. The view reads it data in blocks from the underlying channel and decompress it
before returning to caller. The view can only read data that has been written by ChannelWriterOutputView, due to block formatting.| Constructor and Description |
|---|
ChannelReaderInputView(FileIOChannel.ID id,
IOManager ioManager,
BlockCompressionFactory compressionCodecFactory,
int compressionBlockSize,
int numBlocks) |
| Modifier and Type | Method and Description |
|---|---|
List<MemorySegment> |
close() |
MutableObjectIterator<BinaryRow> |
createBinaryRowIterator(BinaryRowSerializer serializer) |
FileIOChannel |
getChannel() |
protected int |
getLimitForSegment(MemorySegment segment)
Gets the limit for reading bytes from the given memory segment.
|
protected MemorySegment |
nextSegment(MemorySegment current)
The method by which concrete subclasses realize page crossing.
|
advance, clear, doAdvance, getCurrentPositionInSegment, getCurrentSegment, getCurrentSegmentLimit, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seekInput, skipBytes, skipBytesToReadpublic ChannelReaderInputView(FileIOChannel.ID id, IOManager ioManager, BlockCompressionFactory compressionCodecFactory, int compressionBlockSize, int numBlocks) throws IOException
IOExceptionprotected MemorySegment nextSegment(MemorySegment current) throws IOException
AbstractPagedInputViewEOFException.nextSegment in class 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(MemorySegment segment)
AbstractPagedInputViewgetLimitForSegment in class AbstractPagedInputViewsegment - The segment to determine the limit for.public List<MemorySegment> close() throws IOException
IOExceptionpublic FileIOChannel getChannel()
public MutableObjectIterator<BinaryRow> createBinaryRowIterator(BinaryRowSerializer serializer)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.