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
ConstructorsConstructorDescriptionVeniceAvroRecordReader(org.apache.avro.Schema dataSchema, String keyFieldStr, String valueFieldStr, String rmdFieldStr, ETLValueSchemaTransformation etlValueSchemaTransformation, org.apache.avro.Schema updateSchema) This constructor is used when data is read from HDFS.VeniceAvroRecordReader(org.apache.avro.Schema dataSchema, String keyFieldStr, String valueFieldStr, String rmdFieldStr, ETLValueSchemaTransformation etlValueSchemaTransformation, org.apache.avro.Schema updateSchema, org.apache.avro.Schema writerValueSchema, org.apache.avro.Schema writerRmdSchema) -
Method Summary
Modifier and TypeMethodDescriptionstatic VeniceAvroRecordReaderfromProps(VeniceProperties props) protected org.apache.avro.generic.IndexedRecordgetRecordDatum(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, getRmdValueMethods inherited from class com.linkedin.venice.hadoop.input.recordreader.AbstractVeniceRecordReader
configure, configure, getKeyBytes, getKeySchema, getRmdBytes, getRmdSchema, getValueBytes, getValueSchema
-
Constructor Details
-
VeniceAvroRecordReader
public VeniceAvroRecordReader(org.apache.avro.Schema dataSchema, String keyFieldStr, String valueFieldStr, String rmdFieldStr, 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.
-
VeniceAvroRecordReader
public VeniceAvroRecordReader(org.apache.avro.Schema dataSchema, String keyFieldStr, String valueFieldStr, String rmdFieldStr, ETLValueSchemaTransformation etlValueSchemaTransformation, org.apache.avro.Schema updateSchema, org.apache.avro.Schema writerValueSchema, org.apache.avro.Schema writerRmdSchema)
-
-
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:
getRecordDatumin classAbstractAvroRecordReader<org.apache.avro.mapred.AvroWrapper<org.apache.avro.generic.IndexedRecord>,org.apache.hadoop.io.NullWritable>
-