T - The Java type of the Avro data to write.public class AvroKeyRecordWriter<T> extends org.apache.hadoop.mapreduce.RecordWriter<AvroKey<T>,org.apache.hadoop.io.NullWritable>
| Constructor and Description |
|---|
AvroKeyRecordWriter(Schema writerSchema,
GenericData dataModel,
CodecFactory compressionCodec,
OutputStream outputStream)
Constructor.
|
public AvroKeyRecordWriter(Schema writerSchema, GenericData dataModel, CodecFactory compressionCodec, OutputStream outputStream) throws IOException
writerSchema - The writer schema for the records in the Avro container file.compressionCodec - A compression codec factory for the Avro container file.outputStream - The output stream to write the Avro container file to.IOException - If the record writer cannot be opened.public void write(AvroKey<T> record, org.apache.hadoop.io.NullWritable ignore) throws IOException
write in class org.apache.hadoop.mapreduce.RecordWriter<AvroKey<T>,org.apache.hadoop.io.NullWritable>IOExceptionpublic void close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
close in class org.apache.hadoop.mapreduce.RecordWriter<AvroKey<T>,org.apache.hadoop.io.NullWritable>IOExceptionCopyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.