Class AvroTrevniKeyValueRecordWriter<K,V>

java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>>
org.apache.trevni.avro.mapreduce.AvroTrevniRecordWriterBase<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>,org.apache.avro.generic.GenericRecord>
org.apache.trevni.avro.mapreduce.AvroTrevniKeyValueRecordWriter<K,V>
Type Parameters:
K - The type of key to write.
V - The type of value to write.

public class AvroTrevniKeyValueRecordWriter<K,V> extends AvroTrevniRecordWriterBase<org.apache.avro.mapred.AvroKey<K>,org.apache.avro.mapred.AvroValue<V>,org.apache.avro.generic.GenericRecord>
Writes key/value pairs to an Trevni container file.

Each entry in the Trevni container file will be a generic record with two fields, named 'key' and 'value'. The input types may be basic Writable objects like Text or IntWritable, or they may be AvroWrapper subclasses (AvroKey or AvroValue). Writable objects will be converted to their corresponding Avro types when written to the generic record key/value pair.

  • Constructor Details

    • AvroTrevniKeyValueRecordWriter

      public AvroTrevniKeyValueRecordWriter(TaskAttemptContext context) throws IOException
      Constructor.
      Parameters:
      context - The TaskAttempContext to supply the writer with information form the job configuration
      Throws:
      IOException
  • Method Details