public class FileChannelOutputView extends AbstractPagedOutputView
DataOutputView that is backed by a BlockChannelWriter, making it effectively a data output
stream. The view writes it data in blocks to the underlying channel.headerLength, segmentSize| Constructor and Description |
|---|
FileChannelOutputView(BlockChannelWriter<org.apache.flink.core.memory.MemorySegment> writer,
MemoryManager memManager,
List<org.apache.flink.core.memory.MemorySegment> memory,
int segmentSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this output, writing pending data and releasing the memory.
|
void |
closeAndDelete()
Closes this output, writing pending data and releasing the memory.
|
int |
getBlockCount()
Gets the number of blocks written by this output view.
|
int |
getBytesInLatestSegment()
Gets the number of bytes written in the latest memory segment.
|
long |
getWriteOffset() |
protected org.apache.flink.core.memory.MemorySegment |
nextSegment(org.apache.flink.core.memory.MemorySegment current,
int posInSegment)
This method must return a segment.
|
advance, clear, getCurrentPositionInSegment, getCurrentSegment, getHeaderLength, getSegmentSize, seekOutput, skipBytesToWrite, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFpublic FileChannelOutputView(BlockChannelWriter<org.apache.flink.core.memory.MemorySegment> writer, MemoryManager memManager, List<org.apache.flink.core.memory.MemorySegment> memory, int segmentSize) throws IOException
IOExceptionpublic void close()
throws IOException
IOException - Thrown, if the pending data could not be written.public void closeAndDelete()
throws IOException
IOException - Thrown, if the pending data could not be written.public int getBlockCount()
public int getBytesInLatestSegment()
public long getWriteOffset()
protected org.apache.flink.core.memory.MemorySegment nextSegment(org.apache.flink.core.memory.MemorySegment current,
int posInSegment)
throws IOException
AbstractPagedOutputViewEOFException.nextSegment in class AbstractPagedOutputViewcurrent - The current memory segmentposInSegment - The position in the segment, one after the last valid byte.IOExceptionCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.