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
public abstract class AbstractChannelWriterOutputView extends AbstractPagedOutputView
ADataOutputViewthat is backed by aFileIOChannel, 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 Constructor Description AbstractChannelWriterOutputView(int segmentSize, int headerLength)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract intclose()Closes this OutputView, closing the underlying writerabstract intgetBlockCount()Gets the number of blocks used by this view.abstract FileIOChannelgetChannel()Get the underlying channel.abstract longgetNumBytes()Get output bytes.abstract longgetNumCompressedBytes()Get 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
-
-
-
-
Method Detail
-
getChannel
public abstract FileIOChannel getChannel()
Get the underlying channel.
-
close
public abstract int close() throws IOExceptionCloses 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
public abstract long getNumBytes() throws IOExceptionGet output bytes.- Throws:
IOException
-
getNumCompressedBytes
public abstract long getNumCompressedBytes() throws IOExceptionGet output compressed bytes, return num bytes if there is no compression.- Throws:
IOException
-
-