org.apache.hadoop.mapred
Class FileOutputCommitter

java.lang.Object
  extended by org.apache.hadoop.mapreduce.OutputCommitter
      extended by org.apache.hadoop.mapred.OutputCommitter
          extended by org.apache.hadoop.mapred.FileOutputCommitter

public class FileOutputCommitter
extends OutputCommitter

An OutputCommitter that commits files specified in job output directory i.e. ${mapred.output.dir}.


Field Summary
static org.apache.commons.logging.Log LOG
           
static String TEMP_DIR_NAME
          Temporary directory name
 
Constructor Summary
FileOutputCommitter()
           
 
Method Summary
 void abortTask(TaskAttemptContext context)
          Discard the task output
 void cleanupJob(JobContext context)
          For cleaning up the job's output after job completion
 void commitTask(TaskAttemptContext context)
          To promote the task's temporary output to final output location The task's output is moved to the job's output directory.
 boolean needsTaskCommit(TaskAttemptContext context)
          Check whether task needs a commit
 void setupJob(JobContext context)
          For the framework to setup the job output during initialization
 void setupTask(TaskAttemptContext context)
          Sets up output for the task.
 
Methods inherited from class org.apache.hadoop.mapred.OutputCommitter
abortTask, cleanupJob, commitTask, needsTaskCommit, setupJob, setupTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

TEMP_DIR_NAME

public static final String TEMP_DIR_NAME
Temporary directory name

See Also:
Constant Field Values
Constructor Detail

FileOutputCommitter

public FileOutputCommitter()
Method Detail

setupJob

public void setupJob(JobContext context)
              throws IOException
Description copied from class: OutputCommitter
For the framework to setup the job output during initialization

Specified by:
setupJob in class OutputCommitter
Parameters:
context - Context of the job whose output is being written.
Throws:
IOException - if temporary output could not be created

cleanupJob

public void cleanupJob(JobContext context)
                throws IOException
Description copied from class: OutputCommitter
For cleaning up the job's output after job completion

Specified by:
cleanupJob in class OutputCommitter
Parameters:
context - Context of the job whose output is being written.
Throws:
IOException

setupTask

public void setupTask(TaskAttemptContext context)
               throws IOException
Description copied from class: OutputCommitter
Sets up output for the task.

Specified by:
setupTask in class OutputCommitter
Parameters:
context - Context of the task whose output is being written.
Throws:
IOException

commitTask

public void commitTask(TaskAttemptContext context)
                throws IOException
Description copied from class: OutputCommitter
To promote the task's temporary output to final output location The task's output is moved to the job's output directory.

Specified by:
commitTask in class OutputCommitter
Parameters:
context - Context of the task whose output is being written.
Throws:
IOException - if commit is not

abortTask

public void abortTask(TaskAttemptContext context)
               throws IOException
Description copied from class: OutputCommitter
Discard the task output

Specified by:
abortTask in class OutputCommitter
Throws:
IOException

needsTaskCommit

public boolean needsTaskCommit(TaskAttemptContext context)
                        throws IOException
Description copied from class: OutputCommitter
Check whether task needs a commit

Specified by:
needsTaskCommit in class OutputCommitter
Returns:
true/false
Throws:
IOException


Copyright © 2009 The Apache Software Foundation