Class AbstractAvroRecordReader<INPUT_KEY,INPUT_VALUE>
java.lang.Object
com.linkedin.venice.hadoop.input.recordreader.AbstractVeniceRecordReader<INPUT_KEY,INPUT_VALUE>
com.linkedin.venice.hadoop.input.recordreader.avro.AbstractAvroRecordReader<INPUT_KEY,INPUT_VALUE>
- Type Parameters:
INPUT_KEY
- The format of the key as controlled by the input formatINPUT_VALUE
- The format of the value as controlled by the input format
- Direct Known Subclasses:
VeniceAvroRecordReader
public abstract class AbstractAvroRecordReader<INPUT_KEY,INPUT_VALUE>
extends AbstractVeniceRecordReader<INPUT_KEY,INPUT_VALUE>
An abstraction for a record reader that reads records from input into Avro-serialized keys and values.
-
Constructor Summary
ConstructorDescriptionAbstractAvroRecordReader
(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 TypeMethodDescriptiongetAvroKey
(INPUT_KEY inputKey, INPUT_VALUE inputValue) Return an Avro output keygetAvroValue
(INPUT_KEY inputKey, INPUT_VALUE inputValue) return an Avro output valueorg.apache.avro.Schema
protected abstract org.apache.avro.generic.IndexedRecord
getRecordDatum
(INPUT_KEY inputKey, INPUT_VALUE inputValue) Methods inherited from class com.linkedin.venice.hadoop.input.recordreader.AbstractVeniceRecordReader
configure, getKeyBytes, getKeySchema, getValueBytes, getValueSchema
-
Constructor Details
-
AbstractAvroRecordReader
public AbstractAvroRecordReader(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
-
getDataSchema
public org.apache.avro.Schema getDataSchema() -
getRecordDatum
protected abstract org.apache.avro.generic.IndexedRecord getRecordDatum(INPUT_KEY inputKey, INPUT_VALUE inputValue) -
getAvroKey
Description copied from class:AbstractVeniceRecordReader
Return an Avro output key- Specified by:
getAvroKey
in classAbstractVeniceRecordReader<INPUT_KEY,
INPUT_VALUE>
-
getAvroValue
Description copied from class:AbstractVeniceRecordReader
return an Avro output value- Specified by:
getAvroValue
in classAbstractVeniceRecordReader<INPUT_KEY,
INPUT_VALUE>
-