public class AvroWriteSupport<T> extends WriteSupport<T>
WriteSupport
for generic, specific, and
reflect models. Use AvroParquetWriter
or
AvroParquetOutputFormat
rather than using this class directly.WriteSupport.FinalizedWriteContext, WriteSupport.WriteContext
Modifier and Type | Field and Description |
---|---|
static String |
AVRO_DATA_SUPPLIER |
static String |
WRITE_OLD_LIST_STRUCTURE |
Constructor and Description |
---|
AvroWriteSupport() |
AvroWriteSupport(MessageType schema,
org.apache.avro.Schema avroSchema)
Deprecated.
will be removed in 2.0.0
|
AvroWriteSupport(MessageType schema,
org.apache.avro.Schema avroSchema,
org.apache.avro.generic.GenericData model) |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
WriteSupport.WriteContext |
init(org.apache.hadoop.conf.Configuration configuration) |
void |
prepareForWrite(RecordConsumer recordConsumer) |
static void |
setAvroDataSupplier(org.apache.hadoop.conf.Configuration configuration,
Class<? extends AvroDataSupplier> suppClass) |
static void |
setSchema(org.apache.hadoop.conf.Configuration configuration,
org.apache.avro.Schema schema) |
void |
write(org.apache.avro.generic.IndexedRecord record) |
void |
write(T record) |
finalizeWrite
public static final String AVRO_DATA_SUPPLIER
public static final String WRITE_OLD_LIST_STRUCTURE
public AvroWriteSupport()
@Deprecated public AvroWriteSupport(MessageType schema, org.apache.avro.Schema avroSchema)
schema
- the write parquet schemaavroSchema
- the write avro schemapublic AvroWriteSupport(MessageType schema, org.apache.avro.Schema avroSchema, org.apache.avro.generic.GenericData model)
public static void setAvroDataSupplier(org.apache.hadoop.conf.Configuration configuration, Class<? extends AvroDataSupplier> suppClass)
public String getName()
getName
in class WriteSupport<T>
public static void setSchema(org.apache.hadoop.conf.Configuration configuration, org.apache.avro.Schema schema)
configuration
- a configurationschema
- the write schemaAvroParquetOutputFormat.setSchema(org.apache.hadoop.mapreduce.Job, org.apache.avro.Schema)
public WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration)
init
in class WriteSupport<T>
public void prepareForWrite(RecordConsumer recordConsumer)
prepareForWrite
in class WriteSupport<T>
public void write(org.apache.avro.generic.IndexedRecord record)
public void write(T record)
write
in class WriteSupport<T>
Copyright © 2019 The Apache Software Foundation. All rights reserved.