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 ofFieldMetricsthat this MetricsAwareDatumWriter keeps track of.voidsetSchema(org.apache.avro.Schema schema)voidwrite(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:
 setSchemain interfaceorg.apache.avro.io.DatumWriter<T>
 
- 
write
public void write(T datum, org.apache.avro.io.Encoder out) throws java.io.IOException
- Specified by:
 writein interfaceorg.apache.avro.io.DatumWriter<T>- Throws:
 java.io.IOException
 
- 
metrics
public java.util.stream.Stream<FieldMetrics> metrics()
Description copied from interface:MetricsAwareDatumWriterReturns a stream ofFieldMetricsthat this MetricsAwareDatumWriter keeps track of.- Specified by:
 metricsin interfaceMetricsAwareDatumWriter<T>
 
 - 
 
 -