Class AvroParquetWriters
java.lang.Object
org.apache.flink.formats.parquet.avro.AvroParquetWriters
Convenience builder to create
ParquetWriterFactory instances for the different Avro
types.-
Method Summary
Modifier and TypeMethodDescriptionstatic ParquetWriterFactory<org.apache.avro.generic.GenericRecord>forGenericRecord(org.apache.avro.Schema schema) Creates a ParquetWriterFactory that accepts and writes Avro generic types.static <T> ParquetWriterFactory<T>forReflectRecord(Class<T> type) Creates a ParquetWriterFactory for the given type.static <T extends org.apache.avro.specific.SpecificRecordBase>
ParquetWriterFactory<T>forSpecificRecord(Class<T> type) Creates a ParquetWriterFactory for an Avro specific type.
-
Method Details
-
forSpecificRecord
public static <T extends org.apache.avro.specific.SpecificRecordBase> ParquetWriterFactory<T> forSpecificRecord(Class<T> type) Creates a ParquetWriterFactory for an Avro specific type. The Parquet writers will use the schema of that specific type to build and write the columnar data.- Parameters:
type- The class of the type to write.
-
forGenericRecord
public static ParquetWriterFactory<org.apache.avro.generic.GenericRecord> forGenericRecord(org.apache.avro.Schema schema) Creates a ParquetWriterFactory that accepts and writes Avro generic types. The Parquet writers will use the given schema to build and write the columnar data.- Parameters:
schema- The schema of the generic type.
-
forReflectRecord
Creates a ParquetWriterFactory for the given type. The Parquet writers will use Avro to reflectively create a schema for the type and use that schema to write the columnar data.- Parameters:
type- The class of the type to write.
-