Class GenericAvroWriter<T>

java.lang.Object
org.apache.iceberg.avro.GenericAvroWriter<T>
All Implemented Interfaces:
org.apache.avro.io.DatumWriter<T>, MetricsAwareDatumWriter<T>

public class GenericAvroWriter<T> extends Object implements MetricsAwareDatumWriter<T>
  • Method Details

    • create

      public static <D> GenericAvroWriter<D> create(org.apache.avro.Schema schema)
    • setSchema

      public void setSchema(org.apache.avro.Schema schema)
      Specified by:
      setSchema in interface org.apache.avro.io.DatumWriter<T>
    • write

      public void write(T datum, org.apache.avro.io.Encoder out) throws IOException
      Specified by:
      write in interface org.apache.avro.io.DatumWriter<T>
      Throws:
      IOException
    • metrics

      public Stream<FieldMetrics> metrics()
      Description copied from interface: MetricsAwareDatumWriter
      Returns a stream of FieldMetrics that this MetricsAwareDatumWriter keeps track of.
      Specified by:
      metrics in interface MetricsAwareDatumWriter<T>