Package org.apache.hadoop.mapred
Class MapFileOutputFormat
java.lang.Object
org.apache.hadoop.mapred.FileOutputFormat<WritableComparable,Writable>
org.apache.hadoop.mapred.MapFileOutputFormat
- All Implemented Interfaces:
OutputFormat<WritableComparable,Writable>
@Public
@Stable
public class MapFileOutputFormat
extends FileOutputFormat<WritableComparable,Writable>
An
OutputFormat that writes MapFiles.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileOutputFormat
FileOutputFormat.Counter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K extends WritableComparable,V extends Writable>
WritablegetEntry(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(FileSystem ignored, Path dir, Configuration conf) Open the output generated by this format.getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) Get theRecordWriterfor the given job.Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath, setWorkOutputPath
-
Constructor Details
-
MapFileOutputFormat
public MapFileOutputFormat()
-
-
Method Details
-
getRecordWriter
public RecordWriter<WritableComparable,Writable> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException Description copied from interface:OutputFormatGet theRecordWriterfor the given job.- Specified by:
getRecordWriterin interfaceOutputFormat<WritableComparable,Writable> - Specified by:
getRecordWriterin classFileOutputFormat<WritableComparable,Writable> 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
RecordWriterto write the output for the job. - Throws:
IOException
-
getReaders
public static org.apache.hadoop.io.MapFile.Reader[] getReaders(FileSystem ignored, 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 IOExceptionGet an entry from output generated by this class.- Throws:
IOException
-