org.apache.hadoop.mapred
Interface OutputFormat

All Known Implementing Classes:
MapFileOutputFormat, NullOutputFormat, OutputFormatBase, SequenceFileOutputFormat, StreamOutputFormat, TextOutputFormat

public interface OutputFormat

An output data format. Output files are stored in a FileSystem.


Method Summary
 void checkOutputSpecs(FileSystem ignored, JobConf job)
          Check whether the output specification for a job is appropriate.
 RecordWriter getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress)
          Construct a RecordWriter with Progressable.
 

Method Detail

getRecordWriter

RecordWriter getRecordWriter(FileSystem ignored,
                             JobConf job,
                             String name,
                             Progressable progress)
                             throws IOException
Construct a RecordWriter with Progressable.

Parameters:
job - 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
Throws:
IOException

checkOutputSpecs

void checkOutputSpecs(FileSystem ignored,
                      JobConf job)
                      throws IOException
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.

Parameters:
job - the job whose output will be written
Throws:
IOException - when output should not be attempted


Copyright © 2006 The Apache Software Foundation