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).

    public class AvroSequenceFileOutputFormat<K,V>
    extends FileOutputFormat<K,V>

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

Constructors
Constructor and Description
`AvroSequenceFileOutputFormat()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static SequenceFile.CompressionType` `getOutputCompressionType(Configuration conf)` Gets type of compression for the output sequence file.
`RecordWriter<K,V>` `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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AvroSequenceFileOutputFormat

    public AvroSequenceFileOutputFormat()

### Method Detail

#### getRecordWriter

    public RecordWriter<K,V> getRecordWriter(TaskAttemptContext context)
                                      throws IOException,
                                             InterruptedException

Specified by:
  `getRecordWriter` in class `FileOutputFormat<K,V>`
Throws:
  `IOException`
  `InterruptedException`

#### setOutputCompressionType

    public static void setOutputCompressionType(Job job,
                                                SequenceFile.CompressionType compressionType)

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

    public static SequenceFile.CompressionType getOutputCompressionType(Configuration conf)

Gets type of compression for the output sequence file.

Parameters:
  `conf` - The job configuration.
Returns:
  The compression type.