NullOutputFormat (Hadoop 1.2.1 API) (original) (raw)



org.apache.hadoop.mapred.lib

Class NullOutputFormat<K,V>

java.lang.Object extended by org.apache.hadoop.mapred.lib.NullOutputFormat<K,V>

All Implemented Interfaces:

OutputFormat<K,V>


public class NullOutputFormat<K,V>

extends Object

implements OutputFormat<K,V>

Consume all outputs and put them in /dev/null.


Constructor Summary
NullOutputFormat()
Method Summary
void [checkOutputSpecs](../../../../../org/apache/hadoop/mapred/lib/NullOutputFormat.html#checkOutputSpecs%28org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf%29)(FileSystem ignored,JobConf job) Check for validity of the output-specification for the job.
RecordWriter<K,V> [getRecordWriter](../../../../../org/apache/hadoop/mapred/lib/NullOutputFormat.html#getRecordWriter%28org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable%29)(FileSystem ignored,JobConf job,String name,Progressable progress) Get the RecordWriter for the given job.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

NullOutputFormat

public NullOutputFormat()

Method Detail

getRecordWriter

public RecordWriter<K,V> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress)

Description copied from interface: [OutputFormat](../../../../../org/apache/hadoop/mapred/OutputFormat.html#getRecordWriter%28org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable%29)

Get the RecordWriter for the given job.

Specified by:

[getRecordWriter](../../../../../org/apache/hadoop/mapred/OutputFormat.html#getRecordWriter%28org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable%29) in interface [OutputFormat](../../../../../org/apache/hadoop/mapred/OutputFormat.html "interface in org.apache.hadoop.mapred")<[K](../../../../../org/apache/hadoop/mapred/lib/NullOutputFormat.html "type parameter in NullOutputFormat"),[V](../../../../../org/apache/hadoop/mapred/lib/NullOutputFormat.html "type parameter in NullOutputFormat")>

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.


checkOutputSpecs

public void checkOutputSpecs(FileSystem ignored, JobConf job)

Description copied from interface: [OutputFormat](../../../../../org/apache/hadoop/mapred/OutputFormat.html#checkOutputSpecs%28org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf%29)

Check for validity of the output-specification for the job.

This is to validate the output specification for the job when it is 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](../../../../../org/apache/hadoop/mapred/OutputFormat.html#checkOutputSpecs%28org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf%29) in interface [OutputFormat](../../../../../org/apache/hadoop/mapred/OutputFormat.html "interface in org.apache.hadoop.mapred")<[K](../../../../../org/apache/hadoop/mapred/lib/NullOutputFormat.html "type parameter in NullOutputFormat"),[V](../../../../../org/apache/hadoop/mapred/lib/NullOutputFormat.html "type parameter in NullOutputFormat")>

job - job configuration.



Copyright © 2009 The Apache Software Foundation