Package org.apache.flink.formats.avro
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 simpleBulkWriterimplementation that wraps an AvroDataFileWriter.
-
-
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 AvroDataFileWriter.
-
-
-
Constructor Detail
-
AvroBulkWriter
public AvroBulkWriter(org.apache.avro.file.DataFileWriter<T> dataFileWriter)
Create a new AvroBulkWriter wrapping the given AvroDataFileWriter.- Parameters:
dataFileWriter- The underlying Avro writer.
-
-
Method Detail
-
addElement
public void addElement(T element) throws IOException
- Specified by:
addElementin interfaceorg.apache.flink.api.common.serialization.BulkWriter<T>- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceorg.apache.flink.api.common.serialization.BulkWriter<T>- Throws:
IOException
-
finish
public void finish() throws IOException- Specified by:
finishin interfaceorg.apache.flink.api.common.serialization.BulkWriter<T>- Throws:
IOException
-
-