Class FlinkAvroReader

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

    public class FlinkAvroReader
    extends java.lang.Object
    implements org.apache.avro.io.DatumReader<org.apache.flink.table.data.RowData>, SupportsRowPosition
    • Constructor Summary

      Constructors 
      Constructor Description
      FlinkAvroReader​(Schema expectedSchema, org.apache.avro.Schema readSchema)  
      FlinkAvroReader​(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,​?> constants)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.flink.table.data.RowData read​(org.apache.flink.table.data.RowData reuse, org.apache.avro.io.Decoder decoder)  
      void setRowPositionSupplier​(java.util.function.Supplier<java.lang.Long> posSupplier)  
      void setSchema​(org.apache.avro.Schema newFileSchema)  
      • Methods inherited from class java.lang.Object

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

      • FlinkAvroReader

        public FlinkAvroReader​(Schema expectedSchema,
                               org.apache.avro.Schema readSchema)
      • FlinkAvroReader

        public FlinkAvroReader​(Schema expectedSchema,
                               org.apache.avro.Schema readSchema,
                               java.util.Map<java.lang.Integer,​?> constants)
    • Method Detail

      • setSchema

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

        public org.apache.flink.table.data.RowData read​(org.apache.flink.table.data.RowData reuse,
                                                        org.apache.avro.io.Decoder decoder)
                                                 throws java.io.IOException
        Specified by:
        read in interface org.apache.avro.io.DatumReader<org.apache.flink.table.data.RowData>
        Throws:
        java.io.IOException