Package org.apache.avro.mapreduce
Class AvroSequenceFileOutputFormat<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.AvroSequenceFileOutputFormat<K,V>
- Type Parameters:
K
- The job output key type (may be a Writable, AvroKey).V
- The job output value type (may be a Writable, AvroValue).
A sequence file output format that knows how to write AvroKeys and AvroValues
in addition to Writables.
-
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 TypeMethodDescriptionstatic SequenceFile.CompressionType
Gets type of compression for the output sequence file.getRecordWriter
(TaskAttemptContext context) static void
setOutputCompressionType
(Job job, SequenceFile.CompressionType compressionType) Sets the type of compression for the output sequence file.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
-
AvroSequenceFileOutputFormat
public AvroSequenceFileOutputFormat()
-
-
Method Details
-
getRecordWriter
public RecordWriter<K,V> getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException - Specified by:
getRecordWriter
in classFileOutputFormat<K,
V> - Throws:
IOException
InterruptedException
-
setOutputCompressionType
Sets the type of compression for the output sequence file.- Parameters:
job
- The job configuration.compressionType
- The compression type for the target sequence file.
-
getOutputCompressionType
Gets type of compression for the output sequence file.- Parameters:
conf
- The job configuration.- Returns:
- The compression type.
-