Package org.apache.flink.formats.avro
Class AvroWriterFactory<T>
- java.lang.Object
-
- org.apache.flink.formats.avro.AvroWriterFactory<T>
-
- Type Parameters:
T
- The type of record to write.
- All Implemented Interfaces:
Serializable
,BulkWriter.Factory<T>
public class AvroWriterFactory<T> extends Object implements BulkWriter.Factory<T>
A factory that creates anAvroBulkWriter
. The factory takes a user-supplied builder to assemble Parquet's writer and then turns it into a FlinkBulkWriter
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AvroWriterFactory(AvroBuilder<T> avroBuilder)
Creates a new AvroWriterFactory using the given builder to assemble the ParquetWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BulkWriter<T>
create(FSDataOutputStream out)
Creates a writer that writes to the given stream.
-
-
-
Constructor Detail
-
AvroWriterFactory
public AvroWriterFactory(AvroBuilder<T> avroBuilder)
Creates a new AvroWriterFactory using the given builder to assemble the ParquetWriter.
-
-
Method Detail
-
create
public BulkWriter<T> create(FSDataOutputStream out) throws IOException
Description copied from interface:BulkWriter.Factory
Creates a writer that writes to the given stream.- Specified by:
create
in interfaceBulkWriter.Factory<T>
- Parameters:
out
- The output stream to write the encoded data to.- Throws:
IOException
- Thrown if the writer cannot be opened, or if the output stream throws an exception.
-
-