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
@InterfaceAudience.Public
@InterfaceStability.Stable
public class MapFileOutputFormat
- extends FileOutputFormat<WritableComparable<?>,Writable>
An OutputFormat
that writes
MapFile
s.
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 |
MapFileOutputFormat
public MapFileOutputFormat()
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.