MapFileOutputFormat (Hadoop 0.20.2-cdh3u5 API)
Date: 2012-10-05

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.mapreduce.lib.output
Class MapFileOutputFormat

    java.lang.Object
      org.apache.hadoop.mapreduce.OutputFormat<K,V>
          org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<WritableComparable<?>,Writable>
              org.apache.hadoop.mapreduce.lib.output.MapFileOutputFormat

    public class MapFileOutputFormat

extends FileOutputFormat<WritableComparable<?>,Writable>

An `OutputFormat` that writes `MapFile`s.

Field Summary

Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
`BASE_OUTPUT_NAME, PART`

Constructor Summary
`MapFileOutputFormat()`

Method Summary
`static
`<K extends WritableComparable<?>,V extends Writable> Writable`
` | `getEntry(MapFile.Reader[] readers, Partitioner<K,V> partitioner, K key, V value)` Get an entry from output generated by this class.
`static MapFile.Reader[]` | `getReaders(Path dir, Configuration conf)` Open the output generated by this format.
`RecordWriter<WritableComparable<?>,Writable>` | `getRecordWriter(TaskAttemptContext context)` Get the `RecordWriter` for the given task.

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

### MapFileOutputFormat

    public MapFileOutputFormat()

Method Detail

### getRecordWriter

    public RecordWriter<WritableComparable<?>,Writable> getRecordWriter(TaskAttemptContext context)
                                                                 throws IOException

  Description copied from class: `OutputFormat`
  Get the `RecordWriter` for the given task.

  Specified by:
    `getRecordWriter` in class `FileOutputFormat<WritableComparable<?>,Writable>`
  Parameters:
    `context` - the information about the current task.
  Returns:
    a `RecordWriter` to write the output for the job.
  Throws:
    `IOException`

### getReaders

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

  Open the output generated by this format.

  Throws:
    `IOException`

### getEntry

    public static <K extends WritableComparable<?>,V extends Writable> Writable getEntry(MapFile.Reader[] readers,
                                                                                         Partitioner<K,V> partitioner,
                                                                                         K key,
                                                                                         V value)
                             throws IOException

  Get an entry from output generated by this class.

  Throws:
    `IOException`

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