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 WriteSupport<T>
Avro implementation ofWriteSupportfor generic, specific, and reflect models. UseAvroParquetWriterorAvroParquetOutputFormatrather than using this class directly.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.hadoop.api.WriteSupport
WriteSupport.FinalizedWriteContext, WriteSupport.WriteContext
-
-
Field Summary
Fields Modifier and Type Field Description static StringAVRO_DATA_SUPPLIERstatic StringWRITE_OLD_LIST_STRUCTUREstatic StringWRITE_PARQUET_UUID
-
Constructor Summary
Constructors Constructor Description AvroWriteSupport()AvroWriteSupport(MessageType schema, org.apache.avro.Schema avroSchema)Deprecated.will be removed in 2.0.0AvroWriteSupport(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()WriteSupport.WriteContextinit(org.apache.hadoop.conf.Configuration configuration)voidprepareForWrite(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)-
Methods inherited from class org.apache.parquet.hadoop.api.WriteSupport
finalizeWrite
-
-
-
-
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
-
-
Constructor Detail
-
AvroWriteSupport
public AvroWriteSupport()
-
AvroWriteSupport
@Deprecated public AvroWriteSupport(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(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 classWriteSupport<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 WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration)
- Specified by:
initin classWriteSupport<T>
-
prepareForWrite
public void prepareForWrite(RecordConsumer recordConsumer)
- Specified by:
prepareForWritein classWriteSupport<T>
-
write
public void write(org.apache.avro.generic.IndexedRecord record)
-
write
public void write(T record)
- Specified by:
writein classWriteSupport<T>
-
-