org.apache.hadoop.mapred
Class OutputFormatBase
java.lang.Object
org.apache.hadoop.mapred.OutputFormatBase
- All Implemented Interfaces:
- OutputFormat
- Direct Known Subclasses:
- MapFileOutputFormat, SequenceFileOutputFormat, TextOutputFormat
public abstract class OutputFormatBase
- extends Object
- implements OutputFormat
A base class for OutputFormat
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputFormatBase
public OutputFormatBase()
getRecordWriter
public abstract RecordWriter getRecordWriter(FileSystem fs,
JobConf job,
String name)
throws IOException
- Description copied from interface:
OutputFormat
- Construct a
RecordWriter
.
- Specified by:
getRecordWriter
in interface OutputFormat
- Parameters:
fs
- the file system to write tojob
- the job whose output is being writtenname
- the unique name for this part of the output
- Returns:
- a
RecordWriter
- Throws:
IOException
checkOutputSpecs
public void checkOutputSpecs(FileSystem fs,
JobConf job)
throws IOException
- Description copied from interface:
OutputFormat
- Check whether the output specification for a job is appropriate. Called
when a job is submitted. Typically checks that it does not already exist,
throwing an exception when it already exists, so that output is not
overwritten.
- Specified by:
checkOutputSpecs
in interface OutputFormat
job
- the job whose output will be written
- Throws:
IOException
- when output should not be attempted
Copyright © 2006 The Apache Software Foundation