Class AbstractChannelWriterOutputView
java.lang.Object
org.apache.flink.runtime.memory.AbstractPagedOutputView
org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
- All Implemented Interfaces:
DataOutput,org.apache.flink.core.memory.DataOutputView,org.apache.flink.core.memory.MemorySegmentWritable
A
DataOutputView that is backed by a FileIOChannel,
making it effectively a data output stream. The view writes it data in blocks to the underlying
channel.-
Field Summary
Fields inherited from class org.apache.flink.runtime.memory.AbstractPagedOutputView
headerLength, segmentSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intclose()Closes this OutputView, closing the underlying writerabstract intGets the number of blocks used by this view.abstract FileIOChannelGet the underlying channel.abstract longGet output bytes.abstract longGet output compressed bytes, return num bytes if there is no compression.Methods inherited from class org.apache.flink.runtime.memory.AbstractPagedOutputView
advance, clear, getCurrentPositionInSegment, getCurrentSegment, getHeaderLength, getSegmentSize, nextSegment, seekOutput, skipBytesToWrite, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Constructor Details
-
AbstractChannelWriterOutputView
public AbstractChannelWriterOutputView(int segmentSize, int headerLength)
-
-
Method Details
-
getChannel
Get the underlying channel. -
close
Closes this OutputView, closing the underlying writer- Returns:
- the number of bytes in last memory segment.
- Throws:
IOException
-
getBlockCount
public abstract int getBlockCount()Gets the number of blocks used by this view. -
getNumBytes
Get output bytes.- Throws:
IOException
-
getNumCompressedBytes
Get output compressed bytes, return num bytes if there is no compression.- Throws:
IOException
-