Class AvroParquetWriters

java.lang.Object
org.apache.flink.formats.parquet.avro.AvroParquetWriters

@Experimental public class AvroParquetWriters extends Object
Convenience builder to create ParquetWriterFactory instances for the different Avro types.
  • 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

      public static <T> ParquetWriterFactory<T> forReflectRecord(Class<T> type)
      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.