org.apache.hadoop.streaming
Class StreamOutputFormat

java.lang.Object
  extended by org.apache.hadoop.streaming.StreamOutputFormat
All Implemented Interfaces:
OutputFormat

public class StreamOutputFormat
extends Object
implements OutputFormat

Similar to org.apache.hadoop.mapred.TextOutputFormat, but delimits key and value with a TAB.

Author:
Michel Tourn

Constructor Summary
StreamOutputFormat()
           
 
Method Summary
 void checkOutputSpecs(FileSystem fs, JobConf job)
          Check whether the output specification for a job is appropriate.
 RecordWriter getRecordWriter(FileSystem fs, JobConf job, String name, Progressable progr)
          Construct a RecordWriter with Progressable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamOutputFormat

public StreamOutputFormat()
Method Detail

getRecordWriter

public RecordWriter getRecordWriter(FileSystem fs,
                                    JobConf job,
                                    String name,
                                    Progressable progr)
                             throws IOException
Description copied from interface: OutputFormat
Construct a RecordWriter with Progressable.

Specified by:
getRecordWriter in interface OutputFormat
job - the job whose output is being written
name - the unique name for this part of the output
progr - mechanism for reporting progress while writing to file
Returns:
a RecordWriter
Throws:
IOException

checkOutputSpecs

public void checkOutputSpecs(FileSystem fs,
                             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.

Specified by:
checkOutputSpecs in interface OutputFormat
Parameters:
job - the job whose output will be written
Throws:
IOException - when output should not be attempted


Copyright © 2006 The Apache Software Foundation