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
ConstructorsConstructorDescriptionAbstractAvroRecordReader(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. -
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.Schemaprotected abstract org.apache.avro.generic.IndexedRecordgetRecordDatum(INPUT_KEY inputKey, INPUT_VALUE inputValue) getRmdValue(INPUT_KEY inputKey, INPUT_VALUE inputValue) Methods inherited from class com.linkedin.venice.hadoop.input.recordreader.AbstractVeniceRecordReader
configure, configure, getKeyBytes, getKeySchema, getRmdBytes, getRmdSchema, getValueBytes, getValueSchema
-
Constructor Details
-
AbstractAvroRecordReader
public AbstractAvroRecordReader(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.
-
-
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:AbstractVeniceRecordReaderReturn an Avro output key- Specified by:
getAvroKeyin classAbstractVeniceRecordReader<INPUT_KEY,INPUT_VALUE>
-
getRmdValue
- Specified by:
getRmdValuein classAbstractVeniceRecordReader<INPUT_KEY,INPUT_VALUE>
-
getAvroValue
Description copied from class:AbstractVeniceRecordReaderreturn an Avro output value- Specified by:
getAvroValuein classAbstractVeniceRecordReader<INPUT_KEY,INPUT_VALUE>
-