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 String |
TEMP_DIR_NAME
Temporary directory name
|
Constructor and Description |
---|
FileOutputCommitter() |
Modifier and Type | Method and Description |
---|---|
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.
|
abortTask, cleanupJob, commitTask, needsTaskCommit, setupJob, setupTask
public static final org.apache.commons.logging.Log LOG
public static final String TEMP_DIR_NAME
public void setupJob(JobContext context) throws IOException
OutputCommitter
setupJob
in class OutputCommitter
context
- Context of the job whose output is being written.IOException
- if temporary output could not be createdpublic void cleanupJob(JobContext context) throws IOException
OutputCommitter
cleanupJob
in class OutputCommitter
context
- Context of the job whose output is being written.IOException
public void setupTask(TaskAttemptContext context) throws IOException
OutputCommitter
setupTask
in class OutputCommitter
context
- Context of the task whose output is being written.IOException
public void commitTask(TaskAttemptContext context) throws IOException
OutputCommitter
commitTask
in class OutputCommitter
context
- Context of the task whose output is being written.IOException
- if commit is notpublic void abortTask(TaskAttemptContext context) throws IOException
OutputCommitter
abortTask
in class OutputCommitter
IOException
public boolean needsTaskCommit(TaskAttemptContext context) throws IOException
OutputCommitter
needsTaskCommit
in class OutputCommitter
IOException
Copyright © 2010 The Apache Software Foundation