Class DataReader<T>

  • All Implemented Interfaces:
    org.apache.avro.io.DatumReader<T>, SupportsRowPosition

    public class DataReader<T>
    extends java.lang.Object
    implements org.apache.avro.io.DatumReader<T>, SupportsRowPosition
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DataReader​(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,​?> idToConstant)  
    • Constructor Detail

      • DataReader

        protected DataReader​(Schema expectedSchema,
                             org.apache.avro.Schema readSchema,
                             java.util.Map<java.lang.Integer,​?> idToConstant)
    • Method Detail

      • create

        public static <D> DataReader<D> create​(Schema expectedSchema,
                                               org.apache.avro.Schema readSchema)
      • create

        public static <D> DataReader<D> create​(Schema expectedSchema,
                                               org.apache.avro.Schema readSchema,
                                               java.util.Map<java.lang.Integer,​?> idToConstant)
      • setSchema

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

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