Class 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.
    • Constructor Detail

      • 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 Detail

      • 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