Class InternalWriter<T>

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

public class InternalWriter<T> extends Object implements MetricsAwareDatumWriter<T>
A Writer that consumes Iceberg's internal in-memory object model.

Iceberg's internal in-memory object model produces the types defined in Type.TypeID.javaClass().

  • Method Details

    • create

      public static <D> InternalWriter<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>