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
ADataOutputView
that 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 int
close()
Closes this OutputView, closing the underlying writerabstract int
getBlockCount()
Gets the number of blocks used by this view.abstract FileIOChannel
getChannel()
Get the underlying channel.abstract long
getNumBytes()
Get output bytes.abstract long
getNumCompressedBytes()
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 IOException
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
public abstract long getNumBytes() throws IOException
Get output bytes.- Throws:
IOException
-
getNumCompressedBytes
public abstract long getNumCompressedBytes() throws IOException
Get output compressed bytes, return num bytes if there is no compression.- Throws:
IOException
-
-