Class AvroParquetWriters
- java.lang.Object
-
- org.apache.flink.formats.parquet.avro.AvroParquetWriters
-
@Experimental public class AvroParquetWriters extends Object
Convenience builder to createParquetWriterFactoryinstances for the different Avro types.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
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.
-
-