Package org.apache.avro.mapreduce
Class AvroOutputFormatBase<K,V>
java.lang.Object
org.apache.hadoop.mapreduce.OutputFormat<K,V>
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
org.apache.avro.mapreduce.AvroOutputFormatBase<K,V>
- Type Parameters:
K
- The type of key to write.V
- The type of value to write.
- Direct Known Subclasses:
AvroKeyOutputFormat
,AvroKeyValueOutputFormat
Abstract base class for output formats that write Avro container files.
-
Nested Class Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected OutputStream
Gets the target output stream where the Avro container file should be written.protected static CodecFactory
getCompressionCodec
(TaskAttemptContext context) Gets the configured compression codec from the task context.protected static int
getSyncInterval
(TaskAttemptContext context) Gets the configured sync interval from the task context.Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getRecordWriter, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPath
-
Constructor Details
-
AvroOutputFormatBase
public AvroOutputFormatBase()
-
-
Method Details
-
getCompressionCodec
Gets the configured compression codec from the task context.- Parameters:
context
- The task attempt context.- Returns:
- The compression codec to use for the output Avro container file.
-
getAvroFileOutputStream
Gets the target output stream where the Avro container file should be written.- Parameters:
context
- The task attempt context.- Returns:
- The target output stream.
- Throws:
IOException
-
getSyncInterval
Gets the configured sync interval from the task context.- Parameters:
context
- The task attempt context.- Returns:
- The sync interval to use for the output Avro container file.
-