Class FlinkAvroWriter

  • All Implemented Interfaces:
    org.apache.avro.io.DatumWriter<org.apache.flink.table.data.RowData>, MetricsAwareDatumWriter<org.apache.flink.table.data.RowData>

    public class FlinkAvroWriter
    extends java.lang.Object
    implements MetricsAwareDatumWriter<org.apache.flink.table.data.RowData>
    • Constructor Summary

      Constructors 
      Constructor Description
      FlinkAvroWriter​(org.apache.flink.table.types.logical.RowType rowType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.flink.table.data.RowData datum, org.apache.avro.io.Encoder out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlinkAvroWriter

        public FlinkAvroWriter​(org.apache.flink.table.types.logical.RowType rowType)
    • Method Detail

      • setSchema

        public void setSchema​(org.apache.avro.Schema schema)
        Specified by:
        setSchema in interface org.apache.avro.io.DatumWriter<org.apache.flink.table.data.RowData>
      • write

        public void write​(org.apache.flink.table.data.RowData datum,
                          org.apache.avro.io.Encoder out)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.avro.io.DatumWriter<org.apache.flink.table.data.RowData>
        Throws:
        java.io.IOException