Class DataWriter<T>

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

public class DataWriter<T> extends Object implements MetricsAwareDatumWriter<T>
  • Constructor Details

    • DataWriter

      protected DataWriter(org.apache.avro.Schema schema)
  • Method Details

    • create

      public static <D> DataWriter<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
    • createStructWriter

      protected ValueWriter<?> createStructWriter(List<ValueWriter<?>> fields)
    • 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>