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
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    AvroWriteSupport(org.apache.parquet.schema.MessageType schema, org.apache.avro.Schema avroSchema)
    Deprecated.
    will be removed in 2.0.0
    AvroWriteSupport(org.apache.parquet.schema.MessageType schema, org.apache.avro.Schema avroSchema, org.apache.avro.generic.GenericData model)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.apache.parquet.hadoop.api.WriteSupport.WriteContext
    init(org.apache.hadoop.conf.Configuration configuration)
     
    org.apache.parquet.hadoop.api.WriteSupport.WriteContext
    init(org.apache.parquet.conf.ParquetConfiguration configuration)
     
    void
    prepareForWrite(org.apache.parquet.io.api.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)
     

    Methods inherited from class org.apache.parquet.hadoop.api.WriteSupport

    finalizeWrite

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 schema
      avroSchema - 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

      public String getName()
      Overrides:
      getName in class org.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 configuration
      schema - the write schema
      See Also:
    • init

      public org.apache.parquet.hadoop.api.WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration)
      Specified by:
      init in class org.apache.parquet.hadoop.api.WriteSupport<T>
    • init

      public org.apache.parquet.hadoop.api.WriteSupport.WriteContext init(org.apache.parquet.conf.ParquetConfiguration configuration)
      Overrides:
      init in class org.apache.parquet.hadoop.api.WriteSupport<T>
    • prepareForWrite

      public void prepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer)
      Specified by:
      prepareForWrite in class org.apache.parquet.hadoop.api.WriteSupport<T>
    • write

      public void write(org.apache.avro.generic.IndexedRecord record)
    • write

      public void write(T record)
      Specified by:
      write in class org.apache.parquet.hadoop.api.WriteSupport<T>