@InterfaceAudience.Public @InterfaceStability.Unstable public class MagicS3GuardCommitter extends AbstractS3ACommitter
| Constructor and Description |
|---|
MagicS3GuardCommitter(org.apache.hadoop.fs.Path outputPath,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create a task committer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Abort a task.
|
void |
cleanupStagingDirs()
Delete the magic directory.
|
void |
commitTask(org.apache.hadoop.mapreduce.TaskAttemptContext context) |
protected org.apache.hadoop.fs.Path |
getBaseTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Compute the base path where the output of a task attempt is written.
|
protected org.apache.hadoop.fs.Path |
getJobAttemptPath(int appAttemptId)
Compute the path where the output of a given job attempt will be placed.
|
String |
getName()
Get the name of this committer.
|
org.apache.hadoop.fs.Path |
getTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Compute the path where the output of a task attempt is stored until
that task is committed.
|
org.apache.hadoop.fs.Path |
getTempTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Get a temporary directory for data.
|
protected List<SinglePendingCommit> |
listPendingUploadsToCommit(org.apache.hadoop.mapreduce.JobContext context)
Get the list of pending uploads for this job attempt, by listing
all .pendingset files in the job attempt directory.
|
boolean |
needsTaskCommit(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Did this task write any files in the work directory?
Probes for a task existing by looking to see if the attempt dir exists.
|
protected boolean |
requiresDelayedCommitOutputInFileSystem()
Require magic paths in the FS client.
|
void |
setupJob(org.apache.hadoop.mapreduce.JobContext context) |
void |
setupTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Base job setup deletes the success marker.
|
String |
toString() |
abortJob, abortJobInternal, abortPendingUploads, abortPendingUploadsInCleanup, buildThreadPool, cleanup, cleanupJob, commitJob, commitJobInternal, commitPendingUploads, deleteTaskAttemptPathQuietly, getCommitOperations, getConf, getDestFS, getDestinationFS, getDestS3AFS, getJobAttemptPath, getJobContext, getOutputPath, getRole, getTaskAttemptFilesystem, getWorkPath, initOutput, jobCompleted, loadPendingsetFiles, maybeCreateSuccessMarker, maybeCreateSuccessMarkerFromCommits, maybeIgnore, maybeIgnore, preCommitJob, recoverTask, setConf, setDestFS, setOutputPath, setWorkPathhasOutputPathpublic static final String NAME
public MagicS3GuardCommitter(org.apache.hadoop.fs.Path outputPath,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
outputPath - the job's output pathcontext - the task's contextIOException - on a failurepublic String getName()
AbstractS3ACommittergetName in class AbstractS3ACommitterprotected boolean requiresDelayedCommitOutputInFileSystem()
requiresDelayedCommitOutputInFileSystem in class AbstractS3ACommitterpublic void setupJob(org.apache.hadoop.mapreduce.JobContext context)
throws IOException
setupJob in class org.apache.hadoop.mapreduce.OutputCommitterIOExceptionprotected List<SinglePendingCommit> listPendingUploadsToCommit(org.apache.hadoop.mapreduce.JobContext context) throws IOException
listPendingUploadsToCommit in class AbstractS3ACommittercontext - job contextIOException - Any IO failurepublic void cleanupStagingDirs()
cleanupStagingDirs in class AbstractS3ACommitterpublic void setupTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
AbstractS3ACommittersetupTask in class AbstractS3ACommittercontext - contextIOException - IO failurepublic boolean needsTaskCommit(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
needsTaskCommit in class org.apache.hadoop.mapreduce.OutputCommittercontext - the task's contextIOException - failure to list the pathpublic void commitTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
commitTask in class org.apache.hadoop.mapreduce.OutputCommitterIOExceptionpublic void abortTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
abortTask in class org.apache.hadoop.mapreduce.OutputCommittercontext - task contextIOException - if there was some problem querying the path other
than it not actually existing.protected org.apache.hadoop.fs.Path getJobAttemptPath(int appAttemptId)
getJobAttemptPath in class AbstractS3ACommitterappAttemptId - the ID of the application attempt for this job.public org.apache.hadoop.fs.Path getTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context)
getTaskAttemptPath in class AbstractS3ACommittercontext - the context of the task attempt.protected org.apache.hadoop.fs.Path getBaseTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context)
AbstractS3ACommittergetBaseTaskAttemptPath in class AbstractS3ACommittercontext - the context of the task attempt.public org.apache.hadoop.fs.Path getTempTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context)
getTempTaskAttemptPath in class AbstractS3ACommittercontext - task contextpublic String toString()
toString in class AbstractS3ACommitterCopyright © 2008–2021 Apache Software Foundation. All rights reserved.