Class PartitionedStagingCommitter
java.lang.Object
org.apache.hadoop.mapreduce.OutputCommitter
org.apache.hadoop.mapreduce.lib.output.PathOutputCommitter
org.apache.hadoop.fs.s3a.commit.AbstractS3ACommitter
org.apache.hadoop.fs.s3a.commit.staging.StagingCommitter
org.apache.hadoop.fs.s3a.commit.staging.PartitionedStagingCommitter
- All Implemented Interfaces:
org.apache.hadoop.fs.statistics.IOStatisticsSource
Partitioned committer.
This writes data to specific "partition" subdirectories, applying
conflict resolution on a partition-by-partition basis. The existence
and state of any parallel partitions for which there is no are output
files are not considered in the conflict resolution.
The conflict policy is
- FAIL: fail the commit if any of the partitions have data.
- APPEND: add extra data to the destination partitions.
- REPLACE: delete the destination partition in the job commit (i.e. after and only if all tasks have succeeded.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.s3a.commit.AbstractS3ACommitter
AbstractS3ACommitter.ActiveCommit, AbstractS3ACommitter.JobUUIDSource -
Field Summary
FieldsFields inherited from class org.apache.hadoop.fs.s3a.commit.AbstractS3ACommitter
E_SELF_GENERATED_JOB_UUID, THREAD_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionPartitionedStagingCommitter(org.apache.hadoop.fs.Path outputPath, org.apache.hadoop.mapreduce.TaskAttemptContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected intcommitTaskInternal(org.apache.hadoop.mapreduce.TaskAttemptContext context, List<? extends org.apache.hadoop.fs.FileStatus> taskOutput, CommitContext commitContext) Commit the task by uploading all created files and then writing a pending entry for them.getName()Get the name of this committer.voidpreCommitJob(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) All Job-side conflict resolution.toString()Methods inherited from class org.apache.hadoop.fs.s3a.commit.staging.StagingCommitter
abortJobInternal, abortTask, cleanup, cleanupStagingDirs, commitTask, createWrappedCommitter, deleteDestinationPaths, deleteStagingUploadsParentDirectory, deleteTaskWorkingPathQuietly, failDestinationExists, getBaseTaskAttemptPath, getCommittedTaskPath, getCommittedTaskPath, getConfictModeOption, getConflictResolutionMode, getFinalKey, getFinalPath, getJobAttemptFileSystem, getJobAttemptPath, getJobAttemptPath, getJobAttemptPath, getJobPath, getTaskAttemptPath, getTaskOutput, getTempTaskAttemptPath, initFileOutputCommitterOptions, listPendingUploads, listPendingUploadsToAbort, listPendingUploadsToCommit, needsTaskCommit, setupJob, setupTask, useUniqueFilenamesMethods inherited from class org.apache.hadoop.fs.s3a.commit.AbstractS3ACommitter
abortJob, abortPendingUploads, abortPendingUploads, abortPendingUploadsInCleanup, buildJobUUID, cleanupJob, commitJob, commitJobInternal, commitPendingUploads, deleteTaskAttemptPathQuietly, getAuditSpanSource, getCommitOperations, getConf, getDestFS, getDestinationFS, getDestS3AFS, getIOStatistics, getJobContext, getOutputPath, getRole, getTaskAttemptFilesystem, getTaskAttemptPath, getUUID, getUUIDSource, getWorkPath, initiateJobOperation, initiateTaskOperation, initOutput, jobCompleted, maybeCreateSuccessMarker, maybeCreateSuccessMarkerFromCommits, maybeIgnore, maybeIgnore, precommitCheckPendingFiles, recoverTask, requiresDelayedCommitOutputInFileSystem, setConf, setDestFS, setOutputPath, setWorkPath, startOperation, updateCommonContext, warnOnActiveUploadsMethods inherited from class org.apache.hadoop.mapreduce.lib.output.PathOutputCommitter
hasOutputPathMethods inherited from class org.apache.hadoop.mapreduce.OutputCommitter
isCommitJobRepeatable, isRecoverySupported, isRecoverySupported
-
Field Details
-
NAME
Name: "partitioned".- See Also:
-
-
Constructor Details
-
PartitionedStagingCommitter
public PartitionedStagingCommitter(org.apache.hadoop.fs.Path outputPath, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException - Throws:
IOException
-
-
Method Details
-
getName
Description copied from class:AbstractS3ACommitterGet the name of this committer.- Overrides:
getNamein classStagingCommitter- Returns:
- the committer name.
-
toString
- Overrides:
toStringin classStagingCommitter
-
commitTaskInternal
protected int commitTaskInternal(org.apache.hadoop.mapreduce.TaskAttemptContext context, List<? extends org.apache.hadoop.fs.FileStatus> taskOutput, CommitContext commitContext) throws IOException Description copied from class:StagingCommitterCommit the task by uploading all created files and then writing a pending entry for them.- Overrides:
commitTaskInternalin classStagingCommitter- Parameters:
context- task contexttaskOutput- list of files from the outputcommitContext- commit context- Returns:
- number of uploads committed.
- Throws:
IOException- IO Failures.
-
preCommitJob
public void preCommitJob(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) throws IOException All Job-side conflict resolution. The partition path conflict resolution actions are:- FAIL: assume checking has taken place earlier; no more checks.
- APPEND: allowed.; no need to check.
- REPLACE deletes all existing partitions.
- Overrides:
preCommitJobin classStagingCommitter- Parameters:
commitContext- commit contextpending- the pending operations- Throws:
IOException- any failure
-