Class AvroBulkWriter<T>

java.lang.Object
org.apache.flink.formats.avro.AvroBulkWriter<T>
All Implemented Interfaces:
org.apache.flink.api.common.serialization.BulkWriter<T>

public class AvroBulkWriter<T> extends Object implements org.apache.flink.api.common.serialization.BulkWriter<T>
A simple BulkWriter implementation that wraps an Avro DataFileWriter.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.flink.api.common.serialization.BulkWriter

    org.apache.flink.api.common.serialization.BulkWriter.Factory<T extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
    AvroBulkWriter(org.apache.avro.file.DataFileWriter<T> dataFileWriter)
    Create a new AvroBulkWriter wrapping the given Avro DataFileWriter.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addElement(T element)
     
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AvroBulkWriter

      public AvroBulkWriter(org.apache.avro.file.DataFileWriter<T> dataFileWriter)
      Create a new AvroBulkWriter wrapping the given Avro DataFileWriter.
      Parameters:
      dataFileWriter - The underlying Avro writer.
  • Method Details

    • addElement

      public void addElement(T element) throws IOException
      Specified by:
      addElement in interface org.apache.flink.api.common.serialization.BulkWriter<T>
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface org.apache.flink.api.common.serialization.BulkWriter<T>
      Throws:
      IOException
    • finish

      public void finish() throws IOException
      Specified by:
      finish in interface org.apache.flink.api.common.serialization.BulkWriter<T>
      Throws:
      IOException