FileOutputCommitter (Hadoop 0.20.1+169.88 API)
Date: 2010-05-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred
Class FileOutputCommitter

    java.lang.Object
      org.apache.hadoop.mapreduce.OutputCommitter
          org.apache.hadoop.mapred.OutputCommitter
              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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation