|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.OutputCommitter
public abstract class OutputCommitter
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 Summary | |
---|---|
OutputCommitter()
|
Method Summary | |
---|---|
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)
Deprecated. 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputCommitter()
Method Detail |
---|
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
commitJob(JobContext)
or
abortJob(JobContext, JobStatus.State)
instead
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |