public abstract class OutputCommitter extends Object
OutputCommitter
describes the commit of task output for a
Map-Reduce job.
The Map-Reduce framework relies on the OutputCommitter
of
the job to:
FileOutputCommitter
,
JobContext
,
TaskAttemptContext
Constructor and Description |
---|
OutputCommitter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
abortTask(TaskAttemptContext taskContext)
Discard the task output
|
abstract void |
cleanupJob(JobContext jobContext)
For cleaning up the job's output after job completion
|
abstract void |
commitTask(TaskAttemptContext taskContext)
To promote the task's temporary output to final output location
The task's output is moved to the job's output directory.
|
abstract boolean |
needsTaskCommit(TaskAttemptContext taskContext)
Check whether task needs a commit
|
abstract void |
setupJob(JobContext jobContext)
For the framework to setup the job output during initialization
|
abstract void |
setupTask(TaskAttemptContext taskContext)
Sets up output for the task.
|
public abstract void setupJob(JobContext jobContext) throws IOException
jobContext
- Context of the job whose output is being written.IOException
- if temporary output could not be createdpublic abstract void cleanupJob(JobContext jobContext) throws IOException
jobContext
- Context of the job whose output is being written.IOException
public abstract void setupTask(TaskAttemptContext taskContext) throws IOException
taskContext
- Context of the task whose output is being written.IOException
public abstract boolean needsTaskCommit(TaskAttemptContext taskContext) throws IOException
taskContext
- IOException
public abstract void commitTask(TaskAttemptContext taskContext) throws IOException
taskContext
- Context of the task whose output is being written.IOException
- if commit is notpublic abstract void abortTask(TaskAttemptContext taskContext) throws IOException
taskContext
- IOException
Copyright © 2010 The Apache Software Foundation