org.apache.hadoop.streaming
Class MuxOutputFormat

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

public class MuxOutputFormat
extends Object
implements OutputFormat

A multiplexed OutputFormat. The channel choice is encoded within the key. If channels are fed at the same rate then the data can be read back in with a TupleInputFormat. (in a different Job)

Author:
Michel Tourn
See Also:
TupleInputFormat

Constructor Summary
MuxOutputFormat()
           
 
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

MuxOutputFormat

public MuxOutputFormat()
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
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