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<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
          extended by org.apache.hadoop.mapreduce.lib.output.MapFileOutputFormat

@InterfaceAudience.Public
@InterfaceStability.Stable
public class MapFileOutputFormat
extends org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>

An OutputFormat that writes MapFiles.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.Counter
 
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 org.apache.hadoop.io.WritableComparable<?>,V extends org.apache.hadoop.io.Writable>
org.apache.hadoop.io.Writable
getEntry(org.apache.hadoop.io.MapFile.Reader[] readers, org.apache.hadoop.mapreduce.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(org.apache.hadoop.fs.Path dir, org.apache.hadoop.conf.Configuration conf)
          Open the output generated by this format.
 org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
 
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 org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                                                                   throws IOException
Specified by:
getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
Throws:
IOException

getReaders

public static org.apache.hadoop.io.MapFile.Reader[] getReaders(org.apache.hadoop.fs.Path dir,
                                                               org.apache.hadoop.conf.Configuration conf)
                                                        throws IOException
Open the output generated by this format.

Throws:
IOException

getEntry

public static <K extends org.apache.hadoop.io.WritableComparable<?>,V extends org.apache.hadoop.io.Writable> org.apache.hadoop.io.Writable getEntry(org.apache.hadoop.io.MapFile.Reader[] readers,
                                                                                                                                                    org.apache.hadoop.mapreduce.Partitioner<K,V> partitioner,
                                                                                                                                                    K key,
                                                                                                                                                    V value)
                                              throws IOException
Get an entry from output generated by this class.

Throws:
IOException


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.