org.apache.hadoop.mapred
Class MapFileOutputFormat
java.lang.Object
org.apache.hadoop.mapred.FileOutputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>
org.apache.hadoop.mapred.MapFileOutputFormat
- All Implemented Interfaces:
- OutputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class MapFileOutputFormat
- extends FileOutputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>
An OutputFormat
that writes MapFile
s.
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,
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.FileSystem ignored,
org.apache.hadoop.fs.Path dir,
org.apache.hadoop.conf.Configuration conf)
Open the output generated by this format. |
RecordWriter<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable> |
getRecordWriter(org.apache.hadoop.fs.FileSystem ignored,
JobConf job,
String name,
org.apache.hadoop.util.Progressable progress)
Get the RecordWriter for the given job. |
Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat |
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, 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<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable> getRecordWriter(org.apache.hadoop.fs.FileSystem ignored,
JobConf job,
String name,
org.apache.hadoop.util.Progressable progress)
throws IOException
- Description copied from interface:
OutputFormat
- Get the
RecordWriter
for the given job.
- Specified by:
getRecordWriter
in interface OutputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable>
- Specified by:
getRecordWriter
in class FileOutputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.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
RecordWriter
to write the output for the job.
- Throws:
IOException
getReaders
public static org.apache.hadoop.io.MapFile.Reader[] getReaders(org.apache.hadoop.fs.FileSystem ignored,
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,
Partitioner<K,V> partitioner,
K key,
V value)
throws IOException
- Get an entry from output generated by this class.
- Throws:
IOException
Copyright © 2012 Apache Software Foundation. All Rights Reserved.