Package org.apache.iceberg.spark.data
Class SparkAvroWriter
- java.lang.Object
 - 
- org.apache.iceberg.spark.data.SparkAvroWriter
 
 
- 
- All Implemented Interfaces:
 org.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>,MetricsAwareDatumWriter<org.apache.spark.sql.catalyst.InternalRow>
public class SparkAvroWriter extends java.lang.Object implements MetricsAwareDatumWriter<org.apache.spark.sql.catalyst.InternalRow>
 
- 
- 
Constructor Summary
Constructors Constructor Description SparkAvroWriter(org.apache.spark.sql.types.StructType dsSchema) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.stream.Stream<FieldMetrics>metrics()Returns a stream ofFieldMetricsthat this MetricsAwareDatumWriter keeps track of.voidsetSchema(org.apache.avro.Schema schema)voidwrite(org.apache.spark.sql.catalyst.InternalRow datum, org.apache.avro.io.Encoder out) 
 - 
 
- 
- 
Method Detail
- 
setSchema
public void setSchema(org.apache.avro.Schema schema)
- Specified by:
 setSchemain interfaceorg.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>
 
- 
write
public void write(org.apache.spark.sql.catalyst.InternalRow datum, org.apache.avro.io.Encoder out) throws java.io.IOException- Specified by:
 writein interfaceorg.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>- 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<org.apache.spark.sql.catalyst.InternalRow>
 
 - 
 
 -