public class FileOutputCommitter extends OutputCommitter
OutputCommitter that commits files specified
in job output directory i.e. ${mapred.output.dir}.| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
static java.lang.String |
SUCCEEDED_FILE_NAME |
static java.lang.String |
TEMP_DIR_NAME
Temporary directory name
|
| Constructor and Description |
|---|
FileOutputCommitter() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortJob(JobContext context,
int runState)
Delete the temporary directory, including all of the work directories.
|
void |
abortTask(TaskAttemptContext context)
Discard the task output
|
void |
cleanupJob(JobContext context)
Deprecated.
|
void |
commitJob(JobContext context)
For committing job's output after successful 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.
|
abortJob, abortTask, cleanupJob, commitJob, commitTask, needsTaskCommit, setupJob, setupTaskpublic static final org.apache.commons.logging.Log LOG
public static final java.lang.String TEMP_DIR_NAME
public static final java.lang.String SUCCEEDED_FILE_NAME
public void setupJob(JobContext context) throws java.io.IOException
OutputCommittersetupJob in class OutputCommittercontext - Context of the job whose output is being written.java.io.IOException - if temporary output could not be createdpublic void commitJob(JobContext context) throws java.io.IOException
OutputCommitterJobStatus.SUCCEEDED.commitJob in class OutputCommittercontext - Context of the job whose output is being written.java.io.IOException@Deprecated public void cleanupJob(JobContext context) throws java.io.IOException
OutputCommittercleanupJob in class OutputCommitterjava.io.IOExceptionpublic void abortJob(JobContext context, int runState) throws java.io.IOException
abortJob in class OutputCommittercontext - the job's contextrunState - final run state of the job, should be
JobStatus.KILLED or JobStatus.FAILEDjava.io.IOExceptionpublic void setupTask(TaskAttemptContext context) throws java.io.IOException
OutputCommittersetupTask in class OutputCommittercontext - Context of the task whose output is being written.java.io.IOExceptionpublic void commitTask(TaskAttemptContext context) throws java.io.IOException
OutputCommittercommitTask in class OutputCommittercontext - Context of the task whose output is being written.java.io.IOException - if commit is notpublic void abortTask(TaskAttemptContext context) throws java.io.IOException
OutputCommitterabortTask in class OutputCommitterjava.io.IOExceptionpublic boolean needsTaskCommit(TaskAttemptContext context) throws java.io.IOException
OutputCommitterneedsTaskCommit in class OutputCommitterjava.io.IOExceptionCopyright © 2009 The Apache Software Foundation