org.apache.hadoop.mapreduce.lib.output
Class MapFileOutputFormat

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

@InterfaceAudience.Public
@InterfaceStability.Stable
public class MapFileOutputFormat
extends FileOutputFormat<WritableComparable<?>,Writable>

An OutputFormat that writes MapFiles.


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
MapFileOutputFormat()
           
 
Method Summary
static
<K extends WritableComparable<?>,V extends Writable>
Writable
getEntry(org.apache.hadoop.io.MapFile.Reader[] readers, Partitioner<K,V> partitioner, K key, V value)
          Get an entry from output generated by this class.
static org.apache.hadoop.io.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 org.apache.hadoop.io.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(org.apache.hadoop.io.MapFile.Reader[] readers,
                                                                                     Partitioner<K,V> partitioner,
                                                                                     K key,
                                                                                     V value)
                         throws IOException
Get an entry from output generated by this class.

Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.