SequenceFileOutputFormat (Hadoop 0.20.2-CDH3B4 API)
Date: 2011-02-21

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred
Class SequenceFileOutputFormat<K,V>

    java.lang.Object
      org.apache.hadoop.mapred.FileOutputFormat<K,V>
          org.apache.hadoop.mapred.SequenceFileOutputFormat<K,V>

All Implemented Interfaces:
  OutputFormat<K,V>

Direct Known Subclasses:
  SequenceFileAsBinaryOutputFormat

    public class SequenceFileOutputFormat<K,V>

extends FileOutputFormat<K,V>

An `OutputFormat` that writes `SequenceFile`s.

Constructor Summary
`SequenceFileOutputFormat()`

Method Summary
`static SequenceFile.CompressionType` | `getOutputCompressionType(JobConf conf)` Get the `SequenceFile.CompressionType` for the output `SequenceFile`.
`static SequenceFile.Reader[]` | `getReaders(Configuration conf, Path dir)` Open the output generated by this format.
`RecordWriter<K,V>` | `getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress)` Get the `RecordWriter` for the given job.
`static void` | `setOutputCompressionType(JobConf conf, SequenceFile.CompressionType style)` Set the `SequenceFile.CompressionType` for the output `SequenceFile`.

Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
`checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SequenceFileOutputFormat

    public SequenceFileOutputFormat()

Method Detail

### getRecordWriter

    public RecordWriter<K,V> getRecordWriter(FileSystem ignored,
                                             JobConf job,
                                             String name,
                                             Progressable progress)
                                      throws IOException

  Description copied from interface: `OutputFormat`
  Get the `RecordWriter` for the given job.

  Specified by:
    `getRecordWriter` in interface `OutputFormat<K,V>`
  Specified by:
    `getRecordWriter` in class `FileOutputFormat<K,V>`
    `job` - configuration for the job whose output is being written.
    `name` - the unique name for this part of the output.
    `progress` - mechanism for reporting progress while writing to file.
  Returns:
    a `RecordWriter` to write the output for the job.
  Throws:
    `IOException`

### getReaders

    public static SequenceFile.Reader[] getReaders(Configuration conf,
                                                   Path dir)
                                            throws IOException

  Open the output generated by this format.

  Throws:
    `IOException`

### getOutputCompressionType

    public static SequenceFile.CompressionType getOutputCompressionType(JobConf conf)

  Get the `SequenceFile.CompressionType` for the output `SequenceFile`.

  Parameters:
    `conf` - the `JobConf`
  Returns:
    the `SequenceFile.CompressionType` for the output `SequenceFile`, defaulting to `SequenceFile.CompressionType.RECORD`

### setOutputCompressionType

    public static void setOutputCompressionType(JobConf conf,
                                                SequenceFile.CompressionType style)

  Set the `SequenceFile.CompressionType` for the output `SequenceFile`.

  Parameters:
    `conf` - the `JobConf` to modify
    `style` - the `SequenceFile.CompressionType` for the output `SequenceFile`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation