org.apache.avro.mapreduce
Class AvroKeyOutputFormat<T>
java.lang.Object
org.apache.hadoop.mapreduce.OutputFormat<K,V>
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
org.apache.avro.mapreduce.AvroOutputFormatBase<AvroKey<T>,org.apache.hadoop.io.NullWritable>
org.apache.avro.mapreduce.AvroKeyOutputFormat<T>
- Type Parameters:
T - The (java) type of the Avro data to write.
public class AvroKeyOutputFormat<T>
- extends AvroOutputFormatBase<AvroKey<T>,org.apache.hadoop.io.NullWritable>
FileOutputFormat for writing Avro container files.
Since Avro container files only contain records (not key/value pairs), this output
format ignores the value.
| Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat |
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.Counter |
|
Method Summary |
org.apache.hadoop.mapreduce.RecordWriter<AvroKey<T>,org.apache.hadoop.io.NullWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
|
| Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat |
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroKeyOutputFormat
public AvroKeyOutputFormat()
- Constructor.
AvroKeyOutputFormat
protected AvroKeyOutputFormat(AvroKeyOutputFormat.RecordWriterFactory recordWriterFactory)
- Constructor.
- Parameters:
recordWriterFactory - A factory for creating record writers.
getRecordWriter
public org.apache.hadoop.mapreduce.RecordWriter<AvroKey<T>,org.apache.hadoop.io.NullWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
-
- Specified by:
getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<AvroKey<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.