public class FileOutputCommitter extends OutputCommitter
OutputCommitter
that commits files specified
in job output directory i.e. ${mapred.output.dir}.限定符和类型 | 字段和说明 |
---|---|
static String |
SUCCEEDED_FILE_NAME |
protected static String |
TEMP_DIR_NAME
Temporary directory name
|
构造器和说明 |
---|
FileOutputCommitter(Path outputPath,
TaskAttemptContext context)
Create a file output committer
|
限定符和类型 | 方法和说明 |
---|---|
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)
已过时。
|
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.
|
public FileOutputCommitter(Path outputPath, TaskAttemptContext context) throws IOException
outputPath
- the job's output pathcontext
- the task's contextIOException
public void setupJob(JobContext context) throws IOException
setupJob
在类中 OutputCommitter
context
- the job's contextIOException
- if temporary output could not be createdpublic void commitJob(JobContext context) throws IOException
commitJob
在类中 OutputCommitter
context
- the job's context.IOException
@Deprecated public void cleanupJob(JobContext context) throws IOException
OutputCommitter
cleanupJob
在类中 OutputCommitter
IOException
public void abortJob(JobContext context, JobStatus.State state) throws IOException
abortJob
在类中 OutputCommitter
context
- the job's contextstate
- final run state of the job, should be FAILED or KILLEDIOException
public void setupTask(TaskAttemptContext context) throws IOException
setupTask
在类中 OutputCommitter
context
- Context of the task whose output is being written.IOException
public void commitTask(TaskAttemptContext context) throws IOException
commitTask
在类中 OutputCommitter
context
- the task contextIOException
- if commit is notpublic void abortTask(TaskAttemptContext context)
abortTask
在类中 OutputCommitter
public boolean needsTaskCommit(TaskAttemptContext context) throws IOException
needsTaskCommit
在类中 OutputCommitter
context
- the task's contextIOException
public Path getWorkPath() throws IOException
IOException
Copyright © 2009 The Apache Software Foundation