Class VeniceAvroRecordReader


  • public class VeniceAvroRecordReader
    extends AbstractAvroRecordReader<org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord>,​org.apache.hadoop.io.NullWritable>
    A record reader that reads records from Avro file input into Avro-serialized keys and values.
    • Constructor Detail

      • VeniceAvroRecordReader

        public VeniceAvroRecordReader​(org.apache.avro.Schema dataSchema,
                                      java.lang.String keyFieldStr,
                                      java.lang.String valueFieldStr,
                                      ETLValueSchemaTransformation etlValueSchemaTransformation,
                                      org.apache.avro.Schema updateSchema)
        This constructor is used when data is read from HDFS.
        Parameters:
        dataSchema - Schema of the avro file
        keyFieldStr - Field name of the key field
        valueFieldStr - Field name of the value field
        etlValueSchemaTransformation - The type of transformation that was applied to this schema during ETL. When source data set is not an ETL job, use NONE.
    • Method Detail

      • getRecordDatum

        protected org.apache.avro.generic.IndexedRecord getRecordDatum​(org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord> record,
                                                                       org.apache.hadoop.io.NullWritable nullValue)
        Specified by:
        getRecordDatum in class AbstractAvroRecordReader<org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord>,​org.apache.hadoop.io.NullWritable>