org.apache.hadoop.examples.terasort
Class TeraOutputFormat
java.lang.Object
org.apache.hadoop.mapred.FileOutputFormat<K,V>
org.apache.hadoop.mapred.TextOutputFormat<Text,Text>
org.apache.hadoop.examples.terasort.TeraOutputFormat
- All Implemented Interfaces:
- OutputFormat<Text,Text>
public class TeraOutputFormat
- extends TextOutputFormat<Text,Text>
A streamlined text output format that writes key, value, and "\r\n".
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 |
TeraOutputFormat
public TeraOutputFormat()
setFinalSync
public static void setFinalSync(JobConf conf,
boolean newValue)
- Set the requirement for a final sync before the stream is closed.
getFinalSync
public static boolean getFinalSync(JobConf conf)
- Does the user want a final sync at close?
getRecordWriter
public RecordWriter<Text,Text> getRecordWriter(FileSystem ignored,
JobConf job,
String name,
Progressable progress)
throws IOException
- Description copied from interface:
OutputFormat
- Get the
RecordWriter
for the given job.
- Specified by:
getRecordWriter
in interface OutputFormat<Text,Text>
- Overrides:
getRecordWriter
in class TextOutputFormat<Text,Text>
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
Copyright © 2009 The Apache Software Foundation