|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.OutputCommitter org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter
public class FileOutputCommitter
An OutputCommitter
that commits files specified
in job output directory i.e. ${mapred.output.dir}.
Field Summary | |
---|---|
static String |
SUCCEEDED_FILE_NAME
|
protected static String |
TEMP_DIR_NAME
Temporary directory name |
Constructor Summary | |
---|---|
FileOutputCommitter(Path outputPath,
TaskAttemptContext context)
Create a file output committer |
Method Summary | |
---|---|
void |
abortJob(JobContext context,
JobStatus.State state)
Delete the temporary directory, including all of the work directories. |
void |
abortTask(TaskAttemptContext context)
Delete the work directory |
void |
cleanupJob(JobContext context)
Deprecated. |
void |
commitJob(JobContext context)
Delete the temporary directory, including all of the work directories. |
void |
commitTask(TaskAttemptContext context)
Move the files from the work directory to the job output directory |
Path |
getWorkPath()
Get the directory that the task should write results into |
boolean |
needsTaskCommit(TaskAttemptContext context)
Did this task write any files in the work directory? |
void |
setupJob(JobContext context)
Create the temporary directory that is the root of all of the task work directories. |
void |
setupTask(TaskAttemptContext context)
No task setup required. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String TEMP_DIR_NAME
public static final String SUCCEEDED_FILE_NAME
Constructor Detail |
---|
public FileOutputCommitter(Path outputPath, TaskAttemptContext context) throws IOException
outputPath
- the job's output pathcontext
- the task's context
IOException
Method Detail |
---|
public void setupJob(JobContext context) throws IOException
setupJob
in class OutputCommitter
context
- the job's context
IOException
- if temporary output could not be createdpublic void commitJob(JobContext context) throws IOException
commitJob
in class OutputCommitter
context
- the job's context.
IOException
@Deprecated public void cleanupJob(JobContext context) throws IOException
OutputCommitter
cleanupJob
in class OutputCommitter
IOException
public void abortJob(JobContext context, JobStatus.State state) throws IOException
abortJob
in class OutputCommitter
context
- the job's contextstate
- final run state of the job, should be FAILED or KILLED
IOException
public void setupTask(TaskAttemptContext context) throws IOException
setupTask
in class OutputCommitter
context
- Context of the task whose output is being written.
IOException
public void commitTask(TaskAttemptContext context) throws IOException
commitTask
in class OutputCommitter
context
- the task context
IOException
- if commit is notpublic void abortTask(TaskAttemptContext context)
abortTask
in class OutputCommitter
public boolean needsTaskCommit(TaskAttemptContext context) throws IOException
needsTaskCommit
in class OutputCommitter
context
- the task's context
IOException
public Path getWorkPath() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |