org.apache.hadoop.mapred
Class OutputFormatBase<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapred.OutputFormatBase<K,V>
All Implemented Interfaces:
OutputFormat<K,V>

Deprecated. Use FileOutputFormat

@Deprecated
public abstract class OutputFormatBase<K,V>
extends Object
implements OutputFormat<K,V>

A base class for OutputFormat.


Constructor Summary
OutputFormatBase()
          Deprecated.  
 
Method Summary
 void checkOutputSpecs(FileSystem ignored, JobConf job)
          Deprecated. Check for validity of the output-specification for the job.
static boolean getCompressOutput(JobConf conf)
          Deprecated. Is the job output compressed?
static Class<? extends CompressionCodec> getOutputCompressorClass(JobConf conf, Class<? extends CompressionCodec> defaultValue)
          Deprecated. Get the CompressionCodec for compressing the job outputs.
abstract  RecordWriter<K,V> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress)
          Deprecated. Get the RecordWriter for the given job.
static void setCompressOutput(JobConf conf, boolean compress)
          Deprecated. Set whether the output of the job is compressed.
static void setOutputCompressorClass(JobConf conf, Class<? extends CompressionCodec> codecClass)
          Deprecated. Set the CompressionCodec to be used to compress job outputs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputFormatBase

public OutputFormatBase()
Deprecated. 
Method Detail

setCompressOutput

public static void setCompressOutput(JobConf conf,
                                     boolean compress)
Deprecated. 
Set whether the output of the job is compressed.

Parameters:
conf - the JobConf to modify
compress - should the output of the job be compressed?

getCompressOutput

public static boolean getCompressOutput(JobConf conf)
Deprecated. 
Is the job output compressed?

Parameters:
conf - the JobConf to look in
Returns:
true if the job output should be compressed, false otherwise

setOutputCompressorClass

public static void setOutputCompressorClass(JobConf conf,
                                            Class<? extends CompressionCodec> codecClass)
Deprecated. 
Set the CompressionCodec to be used to compress job outputs.

Parameters:
conf - the JobConf to modify
codecClass - the CompressionCodec to be used to compress the job outputs

getOutputCompressorClass

public static Class<? extends CompressionCodec> getOutputCompressorClass(JobConf conf,
                                                                         Class<? extends CompressionCodec> defaultValue)
Deprecated. 
Get the CompressionCodec for compressing the job outputs.

Parameters:
conf - the JobConf to look in
defaultValue - the CompressionCodec to return if not set
Returns:
the CompressionCodec to be used to compress the job outputs
Throws:
IllegalArgumentException - if the class was specified, but not found

getRecordWriter

public abstract RecordWriter<K,V> getRecordWriter(FileSystem ignored,
                                                  JobConf job,
                                                  String name,
                                                  Progressable progress)
                                           throws IOException
Deprecated. 
Description copied from interface: OutputFormat
Get the RecordWriter for the given job.

Specified by:
getRecordWriter in interface OutputFormat<K,V>
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.
Throws:
IOException

checkOutputSpecs

public void checkOutputSpecs(FileSystem ignored,
                             JobConf job)
                      throws FileAlreadyExistsException,
                             InvalidJobConfException,
                             IOException
Deprecated. 
Description copied from interface: OutputFormat
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 in interface OutputFormat<K,V>
job - job configuration.
Throws:
IOException - when output should not be attempted
FileAlreadyExistsException
InvalidJobConfException


Copyright © 2008 The Apache Software Foundation