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
Constructors Constructor Description 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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 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 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 Detail
-
fromProps
public static VeniceAvroRecordReader fromProps(VeniceProperties props)
-
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>
-
-