Class VeniceAvroRecordReader
java.lang.Object
com.linkedin.venice.hadoop.input.recordreader.AbstractVeniceRecordReader<INPUT_KEY,INPUT_VALUE>
com.linkedin.venice.hadoop.input.recordreader.avro.AbstractAvroRecordReader<org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord>,org.apache.hadoop.io.NullWritable>
com.linkedin.venice.hadoop.input.recordreader.avro.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 Summary
ConstructorDescriptionVeniceAvroRecordReader
(org.apache.avro.Schema dataSchema, String keyFieldStr, String valueFieldStr, ETLValueSchemaTransformation etlValueSchemaTransformation, org.apache.avro.Schema updateSchema) This constructor is used when data is read from HDFS. -
Method Summary
Modifier and TypeMethodDescriptionstatic VeniceAvroRecordReader
fromProps
(VeniceProperties props) protected org.apache.avro.generic.IndexedRecord
getRecordDatum
(org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord> record, org.apache.hadoop.io.NullWritable nullValue) Methods inherited from class com.linkedin.venice.hadoop.input.recordreader.avro.AbstractAvroRecordReader
getAvroKey, getAvroValue, getDataSchema
Methods inherited from class com.linkedin.venice.hadoop.input.recordreader.AbstractVeniceRecordReader
configure, getKeyBytes, getKeySchema, getValueBytes, getValueSchema
-
Constructor Details
-
VeniceAvroRecordReader
public VeniceAvroRecordReader(org.apache.avro.Schema dataSchema, String keyFieldStr, 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 filekeyFieldStr
- Field name of the key fieldvalueFieldStr
- Field name of the value fieldetlValueSchemaTransformation
- The type of transformation that was applied to this schema during ETL. When source data set is not an ETL job, use NONE.
-
-
Method Details
-
fromProps
-
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 classAbstractAvroRecordReader<org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord>,
org.apache.hadoop.io.NullWritable>
-