public class SparkAvroWriter extends java.lang.Object implements MetricsAwareDatumWriter<org.apache.spark.sql.catalyst.InternalRow>
Constructor and Description |
---|
SparkAvroWriter(org.apache.spark.sql.types.StructType dsSchema) |
Modifier and Type | Method and Description |
---|---|
java.util.stream.Stream<FieldMetrics> |
metrics()
Returns a stream of
FieldMetrics that this MetricsAwareDatumWriter keeps track of. |
void |
setSchema(org.apache.avro.Schema schema) |
void |
write(org.apache.spark.sql.catalyst.InternalRow datum,
org.apache.avro.io.Encoder out) |
public SparkAvroWriter(org.apache.spark.sql.types.StructType dsSchema)
public void setSchema(org.apache.avro.Schema schema)
setSchema
in interface org.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>
public void write(org.apache.spark.sql.catalyst.InternalRow datum, org.apache.avro.io.Encoder out) throws java.io.IOException
write
in interface org.apache.avro.io.DatumWriter<org.apache.spark.sql.catalyst.InternalRow>
java.io.IOException
public java.util.stream.Stream<FieldMetrics> metrics()
MetricsAwareDatumWriter
FieldMetrics
that this MetricsAwareDatumWriter keeps track of.metrics
in interface MetricsAwareDatumWriter<org.apache.spark.sql.catalyst.InternalRow>