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 of
WriteSupport for generic, specific, and
reflect models. Use AvroParquetWriter or
AvroParquetOutputFormat rather than using this class directly.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.hadoop.api.WriteSupport
org.apache.parquet.hadoop.api.WriteSupport.FinalizedWriteContext, org.apache.parquet.hadoop.api.WriteSupport.WriteContext -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAvroWriteSupport(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
Modifier and TypeMethodDescriptiongetName()org.apache.parquet.hadoop.api.WriteSupport.WriteContextinit(org.apache.hadoop.conf.Configuration configuration) org.apache.parquet.hadoop.api.WriteSupport.WriteContextinit(org.apache.parquet.conf.ParquetConfiguration 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) voidMethods inherited from class org.apache.parquet.hadoop.api.WriteSupport
finalizeWrite
-
Field Details
-
AVRO_DATA_SUPPLIER
- See Also:
-
WRITE_OLD_LIST_STRUCTURE
- See Also:
-
WRITE_PARQUET_UUID
- See Also:
-
WRITE_FIXED_AS_INT96
- See Also:
-
-
Constructor Details
-
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 Details
-
setAvroDataSupplier
public static void setAvroDataSupplier(org.apache.hadoop.conf.Configuration configuration, Class<? extends AvroDataSupplier> suppClass) -
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:
-
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>
-
init
public org.apache.parquet.hadoop.api.WriteSupport.WriteContext init(org.apache.parquet.conf.ParquetConfiguration configuration) - Overrides:
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) -
write
- Specified by:
writein classorg.apache.parquet.hadoop.api.WriteSupport<T>
-