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:
构造器和说明 |
---|
OutputCommitter() |
限定符和类型 | 方法和说明 |
---|---|
void |
abortJob(JobContext jobContext,
JobStatus.State state)
For aborting an unsuccessful job's output.
|
abstract void |
abortTask(TaskAttemptContext taskContext)
Discard the task output
|
void |
cleanupJob(JobContext context)
已过时。
use
commitJob(JobContext) or
abortJob(JobContext, JobStatus.State) instead |
void |
commitJob(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 void commitJob(JobContext jobContext) throws IOException
JobStatus.State.SUCCEEDED
jobContext
- Context of the job whose output is being written.IOException
@Deprecated public void cleanupJob(JobContext context) throws IOException
IOException
public void abortJob(JobContext jobContext, JobStatus.State state) throws IOException
JobStatus.State.FAILED
or
JobStatus.State.KILLED
.jobContext
- Context of the job whose output is being written.state
- final run state of the job, should be either
JobStatus.State.KILLED
or JobStatus.State.FAILED
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 © 2009 The Apache Software Foundation