Class HeaderlessChannelWriterOutputView

  • All Implemented Interfaces:
    DataOutput, org.apache.flink.core.memory.DataOutputView, org.apache.flink.core.memory.MemorySegmentWritable

    public final class HeaderlessChannelWriterOutputView
    extends org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
    A DataOutputView that is backed by a BlockChannelWriter, making it effectively a data output stream. The view writes its data in blocks to the underlying channel, but does not expect header for each block.
    • Field Summary

      • Fields inherited from class org.apache.flink.runtime.memory.AbstractPagedOutputView

        headerLength, segmentSize
    • Constructor Summary

      Constructors 
      Constructor Description
      HeaderlessChannelWriterOutputView​(org.apache.flink.runtime.io.disk.iomanager.BlockChannelWriter<org.apache.flink.core.memory.MemorySegment> writer, List<org.apache.flink.core.memory.MemorySegment> memory, int segmentSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int close()
      Closes this OutputView, closing the underlying writer.
      int getBlockCount()  
      org.apache.flink.runtime.io.disk.iomanager.FileIOChannel getChannel()  
      long getNumBytes()  
      long getNumCompressedBytes()  
      org.apache.flink.core.memory.MemorySegment nextSegment​(org.apache.flink.core.memory.MemorySegment current, int posInSegment)  
      • Methods inherited from class org.apache.flink.runtime.memory.AbstractPagedOutputView

        advance, clear, getCurrentPositionInSegment, getCurrentSegment, getHeaderLength, getSegmentSize, seekOutput, skipBytesToWrite, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
    • Constructor Detail

      • HeaderlessChannelWriterOutputView

        public HeaderlessChannelWriterOutputView​(org.apache.flink.runtime.io.disk.iomanager.BlockChannelWriter<org.apache.flink.core.memory.MemorySegment> writer,
                                                 List<org.apache.flink.core.memory.MemorySegment> memory,
                                                 int segmentSize)
    • Method Detail

      • getChannel

        public org.apache.flink.runtime.io.disk.iomanager.FileIOChannel getChannel()
        Specified by:
        getChannel in class org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
      • close

        public int close()
                  throws IOException
        Closes this OutputView, closing the underlying writer. And return number bytes in last memory segment.
        Specified by:
        close in class org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
        Throws:
        IOException
      • getBlockCount

        public int getBlockCount()
        Specified by:
        getBlockCount in class org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
      • getNumBytes

        public long getNumBytes()
                         throws IOException
        Specified by:
        getNumBytes in class org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
        Throws:
        IOException
      • getNumCompressedBytes

        public long getNumCompressedBytes()
                                   throws IOException
        Specified by:
        getNumCompressedBytes in class org.apache.flink.runtime.io.disk.iomanager.AbstractChannelWriterOutputView
        Throws:
        IOException
      • nextSegment

        public org.apache.flink.core.memory.MemorySegment nextSegment​(org.apache.flink.core.memory.MemorySegment current,
                                                                      int posInSegment)
                                                               throws IOException
        Specified by:
        nextSegment in class org.apache.flink.runtime.memory.AbstractPagedOutputView
        Throws:
        IOException