Class RecordReader


  • public class RecordReader
    extends java.lang.Object
    Reads values from GenericRecord The value is converted, if there is a TypeConversion registered. Otherwise, the value read from GenericRecord is returned as-is.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static RecordReader get()  
      java.lang.Object read​(org.apache.avro.generic.GenericRecord genericRecord, java.lang.String fieldName)
      Read the value of the field.
      • Methods inherited from class java.lang.Object

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

      • read

        public java.lang.Object read​(org.apache.avro.generic.GenericRecord genericRecord,
                                     java.lang.String fieldName)
        Read the value of the field. Conversion is applied (if applicable for the field) before returning. For example, a field is read as string with the UUID logical type, it is converted to a UUID and returned. See RecordReader() for all the registered conversions.
        Parameters:
        genericRecord - data container to read from
        fieldName - field to read
        Returns:
        value of the field