Package org.apache.trevni.avro.mapreduce
Class AvroTrevniKeyRecordWriter<T>
java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<AvroKey<T>,NullWritable>
org.apache.trevni.avro.mapreduce.AvroTrevniRecordWriterBase<AvroKey<T>,NullWritable,T>
org.apache.trevni.avro.mapreduce.AvroTrevniKeyRecordWriter<T>
- Type Parameters:
T
- The Java type of the Trevni data to write.
public class AvroTrevniKeyRecordWriter<T>
extends AvroTrevniRecordWriterBase<AvroKey<T>,NullWritable,T>
Writes Trevni records to an Trevni container file output stream.
-
Field Summary
Fields inherited from class org.apache.trevni.avro.mapreduce.AvroTrevniRecordWriterBase
EXT, meta, META_PREFIX, part, schema, writer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Schema
initSchema
(TaskAttemptContext context) Use the task context to construct a schema for writingvoid
write
(AvroKey<T> key, NullWritable value) Methods inherited from class org.apache.trevni.avro.mapreduce.AvroTrevniRecordWriterBase
close, flush
-
Constructor Details
-
AvroTrevniKeyRecordWriter
Constructor.- Parameters:
context
- The TaskAttempContext to supply the writer with information form the job configuration- Throws:
IOException
-
-
Method Details
-
write
- Specified by:
write
in classRecordWriter<AvroKey<T>,
NullWritable> - Throws:
IOException
InterruptedException
-
initSchema
Use the task context to construct a schema for writing- Specified by:
initSchema
in classAvroTrevniRecordWriterBase<AvroKey<T>,
NullWritable, T>
-