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 Object
implements MetricsAwareDatumWriter<org.apache.spark.sql.catalyst.InternalRow>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionmetrics()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) 
- 
Constructor Details- 
SparkAvroWriterpublic SparkAvroWriter(org.apache.spark.sql.types.StructType dsSchema) 
 
- 
- 
Method Details- 
setSchemapublic void setSchema(org.apache.avro.Schema schema) - Specified by:
- setSchemain interface- org.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>
 
- 
writepublic void write(org.apache.spark.sql.catalyst.InternalRow datum, org.apache.avro.io.Encoder out) throws IOException - Specified by:
- writein interface- org.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>
- Throws:
- IOException
 
- 
metricsDescription copied from interface:MetricsAwareDatumWriterReturns a stream ofFieldMetricsthat this MetricsAwareDatumWriter keeps track of.- Specified by:
- metricsin interface- MetricsAwareDatumWriter<org.apache.spark.sql.catalyst.InternalRow>
 
 
-