Package org.apache.parquet.avro
Class AvroWriteSupport<T>
- java.lang.Object
-
- org.apache.parquet.hadoop.api.WriteSupport<T>
-
- org.apache.parquet.avro.AvroWriteSupport<T>
-
public class AvroWriteSupport<T> extends org.apache.parquet.hadoop.api.WriteSupport<T>Avro implementation ofWriteSupportfor generic, specific, and reflect models. UseAvroParquetWriterorAvroParquetOutputFormatrather than using this class directly.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAVRO_DATA_SUPPLIERstatic StringWRITE_FIXED_AS_INT96static StringWRITE_OLD_LIST_STRUCTUREstatic StringWRITE_PARQUET_UUID
-
Constructor Summary
Constructors Constructor Description AvroWriteSupport()AvroWriteSupport(org.apache.parquet.schema.MessageType schema, org.apache.avro.Schema avroSchema)Deprecated.will be removed in 2.0.0AvroWriteSupport(org.apache.parquet.schema.MessageType schema, org.apache.avro.Schema avroSchema, org.apache.avro.generic.GenericData model)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()org.apache.parquet.hadoop.api.WriteSupport.WriteContextinit(org.apache.hadoop.conf.Configuration configuration)voidprepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer)static voidsetAvroDataSupplier(org.apache.hadoop.conf.Configuration configuration, Class<? extends AvroDataSupplier> suppClass)static voidsetSchema(org.apache.hadoop.conf.Configuration configuration, org.apache.avro.Schema schema)voidwrite(org.apache.avro.generic.IndexedRecord record)voidwrite(T record)
-
-
-
Field Detail
-
AVRO_DATA_SUPPLIER
public static final String AVRO_DATA_SUPPLIER
- See Also:
- Constant Field Values
-
WRITE_OLD_LIST_STRUCTURE
public static final String WRITE_OLD_LIST_STRUCTURE
- See Also:
- Constant Field Values
-
WRITE_PARQUET_UUID
public static final String WRITE_PARQUET_UUID
- See Also:
- Constant Field Values
-
WRITE_FIXED_AS_INT96
public static final String WRITE_FIXED_AS_INT96
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AvroWriteSupport
public AvroWriteSupport()
-
AvroWriteSupport
@Deprecated public AvroWriteSupport(org.apache.parquet.schema.MessageType schema, org.apache.avro.Schema avroSchema)
Deprecated.will be removed in 2.0.0- Parameters:
schema- the write parquet schemaavroSchema- the write avro schema
-
AvroWriteSupport
public AvroWriteSupport(org.apache.parquet.schema.MessageType schema, org.apache.avro.Schema avroSchema, org.apache.avro.generic.GenericData model)
-
-
Method Detail
-
setAvroDataSupplier
public static void setAvroDataSupplier(org.apache.hadoop.conf.Configuration configuration, Class<? extends AvroDataSupplier> suppClass)
-
getName
public String getName()
- Overrides:
getNamein classorg.apache.parquet.hadoop.api.WriteSupport<T>
-
setSchema
public static void setSchema(org.apache.hadoop.conf.Configuration configuration, org.apache.avro.Schema schema)- Parameters:
configuration- a configurationschema- the write schema- See Also:
AvroParquetOutputFormat.setSchema(org.apache.hadoop.mapreduce.Job, org.apache.avro.Schema)
-
init
public org.apache.parquet.hadoop.api.WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration)
- Specified by:
initin classorg.apache.parquet.hadoop.api.WriteSupport<T>
-
prepareForWrite
public void prepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer)
- Specified by:
prepareForWritein classorg.apache.parquet.hadoop.api.WriteSupport<T>
-
write
public void write(org.apache.avro.generic.IndexedRecord record)
-
-