Package org.apache.iceberg.avro
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 java.lang.Object implements MetricsAwareDatumWriter<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <D> GenericAvroWriter<D>
create(org.apache.avro.Schema schema)
java.util.stream.Stream<FieldMetrics>
metrics()
Returns a stream ofFieldMetrics
that this MetricsAwareDatumWriter keeps track of.void
setSchema(org.apache.avro.Schema schema)
void
write(T datum, org.apache.avro.io.Encoder out)
-
-
-
Method Detail
-
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 interfaceorg.apache.avro.io.DatumWriter<T>
-
write
public void write(T datum, org.apache.avro.io.Encoder out) throws java.io.IOException
- Specified by:
write
in interfaceorg.apache.avro.io.DatumWriter<T>
- Throws:
java.io.IOException
-
metrics
public java.util.stream.Stream<FieldMetrics> metrics()
Description copied from interface:MetricsAwareDatumWriter
Returns a stream ofFieldMetrics
that this MetricsAwareDatumWriter keeps track of.- Specified by:
metrics
in interfaceMetricsAwareDatumWriter<T>
-
-