Package org.apache.avro.mapreduce
Class AvroKeyOutputFormat<T>
java.lang.Object
org.apache.hadoop.mapreduce.OutputFormat<AvroKey<T>,NullWritable>
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<AvroKey<T>,NullWritable>
org.apache.avro.mapreduce.AvroOutputFormatBase<AvroKey<T>,NullWritable>
org.apache.avro.mapreduce.AvroKeyOutputFormat<T>
- Type Parameters:
T
- The (java) type of the Avro data to write.
FileOutputFormat for writing Avro container files.
Since Avro container files only contain records (not key/value pairs), this output format ignores the value.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
A factory for creating record writers.Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
FileOutputFormat.Counter
-
Field Summary
Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
BASE_OUTPUT_NAME, COMPRESS, COMPRESS_CODEC, COMPRESS_TYPE, OUTDIR, PART
-
Constructor Summary
ModifierConstructorDescriptionConstructor.protected
AvroKeyOutputFormat
(AvroKeyOutputFormat.RecordWriterFactory recordWriterFactory) Constructor. -
Method Summary
Methods inherited from class org.apache.avro.mapreduce.AvroOutputFormatBase
getAvroFileOutputStream, getCompressionCodec, getSyncInterval
Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPath
-
Constructor Details
-
AvroKeyOutputFormat
public AvroKeyOutputFormat()Constructor. -
AvroKeyOutputFormat
Constructor.- Parameters:
recordWriterFactory
- A factory for creating record writers.
-
-
Method Details
-
getRecordWriter
public RecordWriter<AvroKey<T>,NullWritable> getRecordWriter(TaskAttemptContext context) throws IOException - Specified by:
getRecordWriter
in classFileOutputFormat<AvroKey<T>,
NullWritable> - Throws:
IOException
-