Class AbstractS3ACommitter
- All Implemented Interfaces:
org.apache.hadoop.fs.statistics.IOStatisticsSource
- Direct Known Subclasses:
MagicS3GuardCommitter,StagingCommitter
AbstractS3ACommitter.ActiveCommit class with the
list of .pendingset files to load and then commit; that can be done
incrementally and in parallel.
As a side effect of this change, unless/until changed,
the commit/abort/revert of all files uploaded by a single task will be
serialized. This may slow down these operations if there are many files
created by a few tasks, and the HTTP connection pool in the S3A
committer was large enough for more all the parallel POST requests.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classState of the active commit operation.static enumEnumeration of Job UUID source. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractS3ACommitter(org.apache.hadoop.fs.Path outputPath, org.apache.hadoop.mapreduce.TaskAttemptContext context) Create a committer. -
Method Summary
Modifier and TypeMethodDescriptionvoidabortJob(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.mapreduce.JobStatus.State state) protected voidabortJobInternal(CommitContext commitContext, boolean suppressExceptions) The internal job abort operation; can be overridden in tests.protected voidabortPendingUploads(CommitContext commitContext, List<SinglePendingCommit> pending, boolean suppressExceptions) Abort all pending uploads in the list.protected voidabortPendingUploads(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending, boolean suppressExceptions, boolean deleteRemoteFiles) Abort all pending uploads in the list.protected voidabortPendingUploadsInCleanup(boolean suppressExceptions, CommitContext commitContext) Abort all pending uploads to the destination directory during job cleanup operations.static org.apache.commons.lang3.tuple.Pair<String,AbstractS3ACommitter.JobUUIDSource> buildJobUUID(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.JobID jobId) Build the job UUID.protected voidcleanup(CommitContext commitContext, boolean suppressExceptions) Cleanup the job context, including aborting anything pending and destroying the thread pool.voidcleanupJob(org.apache.hadoop.mapreduce.JobContext context) abstract voidClean up any staging directories.voidcommitJob(org.apache.hadoop.mapreduce.JobContext context) Commit work.protected voidcommitJobInternal(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) Internal Job commit operation: where the S3 requests are made (potentially in parallel).protected voidcommitPendingUploads(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) Commit all the pending uploads.protected voiddeleteTaskAttemptPathQuietly(org.apache.hadoop.mapreduce.TaskAttemptContext context) Delete the task attempt path without raising any errors.protected org.apache.hadoop.fs.store.audit.AuditSpanSourceprotected abstract org.apache.hadoop.fs.PathgetBaseTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context) Compute the base path where the output of a task attempt is written.protected CommitOperationsGet the commit actions instance.final org.apache.hadoop.conf.ConfigurationgetConf()org.apache.hadoop.fs.FileSystemGet the destination FS, creating it on demand if needed.protected org.apache.hadoop.fs.FileSystemgetDestinationFS(org.apache.hadoop.fs.Path out, org.apache.hadoop.conf.Configuration config) Get the destination filesystem from the output path and the configuration.Get the destination as an S3A Filesystem; casting it.org.apache.hadoop.fs.statistics.IOStatisticsprotected abstract org.apache.hadoop.fs.PathgetJobAttemptPath(int appAttemptId) Compute the path where the output of a given job attempt will be placed.org.apache.hadoop.fs.PathgetJobAttemptPath(org.apache.hadoop.mapreduce.JobContext context) Compute the path where the output of a given job attempt will be placed.final org.apache.hadoop.mapreduce.JobContextGet the job/task context this committer was instantiated with.protected abstract org.apache.hadoop.fs.PathCompute the path under which all job attempts will be placed.abstract StringgetName()Get the name of this committer.final org.apache.hadoop.fs.PathFinal path of output, in the destination FS.protected StringgetRole()Used in logging and reporting to help disentangle messages.protected org.apache.hadoop.fs.FileSystemgetTaskAttemptFilesystem(org.apache.hadoop.mapreduce.TaskAttemptContext context) Get the task attempt path filesystem.org.apache.hadoop.fs.PathgetTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context) Compute the path where the output of a task attempt is stored until that task is committed.abstract org.apache.hadoop.fs.PathgetTempTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context) Get a temporary directory for data.final StringgetUUID()The Job UUID, as passed in or generated.Source of the UUID.final org.apache.hadoop.fs.PathThis is the critical method forFileOutputFormat; it declares the path for work.protected CommitContextinitiateJobOperation(org.apache.hadoop.mapreduce.JobContext context) Start the final job commit/abort commit operations.protected CommitContextinitiateTaskOperation(org.apache.hadoop.mapreduce.JobContext context) Start a ask commit/abort commit operations.protected voidinitOutput(org.apache.hadoop.fs.Path out) Init the output filesystem and path.protected voidjobCompleted(boolean success) Job completion outcome; this may be subclassed in tests.protected abstract AbstractS3ACommitter.ActiveCommitlistPendingUploadsToCommit(CommitContext commitContext) Get the list of pending uploads for this job attempt.protected SuccessDatamaybeCreateSuccessMarker(org.apache.hadoop.mapreduce.JobContext context, List<String> filenames, org.apache.hadoop.fs.statistics.IOStatisticsSnapshot ioStatistics) if the job requires a success marker on a successful job, create the_SUCCESSfile.protected SuccessDatamaybeCreateSuccessMarkerFromCommits(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) if the job requires a success marker on a successful job, create the fileCommitConstants._SUCCESS.protected voidmaybeIgnore(boolean suppress, String action, IOException ex) Log or rethrow a caught IOException.protected voidmaybeIgnore(boolean suppress, String action, org.apache.hadoop.util.functional.InvocationRaisingIOE operation) Execute an operation; maybe suppress any raised IOException.protected voidprecommitCheckPendingFiles(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) Run a precommit check that all files are loadable.voidpreCommitJob(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) Subclass-specific pre-Job-commit actions.voidrecoverTask(org.apache.hadoop.mapreduce.TaskAttemptContext taskContext) Task recovery considered Unsupported: Warn and fail.protected booleanFlag to indicate whether or not the destination filesystem needs to be configured to support magic paths where the output isn't immediately visible.protected final voidsetConf(org.apache.hadoop.conf.Configuration conf) protected voidsetDestFS(org.apache.hadoop.fs.FileSystem destFS) Set the destination FS: the FS of the final output.protected final voidsetOutputPath(org.apache.hadoop.fs.Path outputPath) Set the output path.voidsetupJob(org.apache.hadoop.mapreduce.JobContext context) Base job setup (optionally) deletes the success marker and always creates the destination directory.voidsetupTask(org.apache.hadoop.mapreduce.TaskAttemptContext context) Task setup.protected final voidsetWorkPath(org.apache.hadoop.fs.Path workPath) Set the work path for this committer.protected org.apache.hadoop.fs.store.audit.AuditSpanstartOperation(String name, String path1, String path2) Start an operation; retrieve an audit span.toString()protected final voidAdd jobID to current context.protected voidwarnOnActiveUploads(org.apache.hadoop.fs.Path path) Scan for active uploads and list them along with a warning message.Methods inherited from class org.apache.hadoop.mapreduce.lib.output.PathOutputCommitter
hasOutputPathMethods inherited from class org.apache.hadoop.mapreduce.OutputCommitter
abortTask, commitTask, isCommitJobRepeatable, isRecoverySupported, isRecoverySupported, needsTaskCommit
-
Field Details
-
THREAD_PREFIX
- See Also:
-
E_SELF_GENERATED_JOB_UUID
Error string when task setup fails.- See Also:
-
-
Constructor Details
-
AbstractS3ACommitter
protected AbstractS3ACommitter(org.apache.hadoop.fs.Path outputPath, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException Create a committer. This constructor binds the destination directory and configuration, but does not update the work path: That must be calculated by the implementation; It is omitted here to avoid subclass methods being called too early.- Parameters:
outputPath- the job's output path: MUST NOT be null.context- the task's context- Throws:
IOException- on a failure
-
-
Method Details
-
initOutput
Init the output filesystem and path. TESTING ONLY; allows mock FS to cheat.- Parameters:
out- output path- Throws:
IOException- failure to create the FS.
-
getJobContext
public final org.apache.hadoop.mapreduce.JobContext getJobContext()Get the job/task context this committer was instantiated with.- Returns:
- the context.
-
getOutputPath
public final org.apache.hadoop.fs.Path getOutputPath()Final path of output, in the destination FS.- Specified by:
getOutputPathin classorg.apache.hadoop.mapreduce.lib.output.PathOutputCommitter- Returns:
- the path
-
setOutputPath
protected final void setOutputPath(org.apache.hadoop.fs.Path outputPath) Set the output path.- Parameters:
outputPath- new value
-
getWorkPath
public final org.apache.hadoop.fs.Path getWorkPath()This is the critical method forFileOutputFormat; it declares the path for work.- Specified by:
getWorkPathin classorg.apache.hadoop.mapreduce.lib.output.PathOutputCommitter- Returns:
- the working path.
-
setWorkPath
protected final void setWorkPath(org.apache.hadoop.fs.Path workPath) Set the work path for this committer.- Parameters:
workPath- the work path to use.
-
getConf
public final org.apache.hadoop.conf.Configuration getConf() -
setConf
protected final void setConf(org.apache.hadoop.conf.Configuration conf) -
getDestFS
Get the destination FS, creating it on demand if needed.- Returns:
- the filesystem; requires the output path to be set up
- Throws:
IOException- if the FS cannot be instantiated.
-
getDestS3AFS
Get the destination as an S3A Filesystem; casting it.- Returns:
- the dest S3A FS.
- Throws:
IOException- if the FS cannot be instantiated.
-
setDestFS
protected void setDestFS(org.apache.hadoop.fs.FileSystem destFS) Set the destination FS: the FS of the final output.- Parameters:
destFS- destination FS.
-
getJobAttemptPath
public org.apache.hadoop.fs.Path getJobAttemptPath(org.apache.hadoop.mapreduce.JobContext context) Compute the path where the output of a given job attempt will be placed.- Parameters:
context- the context of the job. This is used to get the application attempt ID.- Returns:
- the path to store job attempt data.
-
getJobPath
protected abstract org.apache.hadoop.fs.Path getJobPath()Compute the path under which all job attempts will be placed.- Returns:
- the path to store job attempt data.
-
getJobAttemptPath
protected abstract org.apache.hadoop.fs.Path getJobAttemptPath(int appAttemptId) Compute the path where the output of a given job attempt will be placed.- Parameters:
appAttemptId- the ID of the application attempt for this job.- Returns:
- the path to store job attempt data.
-
getTaskAttemptPath
public 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. This may be the normal Task attempt path or it may be a subdirectory. The default implementation returns the value ofgetBaseTaskAttemptPath(TaskAttemptContext); subclasses may return different values.- Parameters:
context- the context of the task attempt.- Returns:
- the path where a task attempt should be stored.
-
getBaseTaskAttemptPath
protected abstract 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. This is the path which will be deleted when a task is cleaned up and aborted.- Parameters:
context- the context of the task attempt.- Returns:
- the path where a task attempt should be stored.
-
getTempTaskAttemptPath
public abstract org.apache.hadoop.fs.Path getTempTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context) Get a temporary directory for data. When a task is aborted/cleaned up, the contents of this directory are all deleted.- Parameters:
context- task context- Returns:
- a path for temporary data.
-
getName
Get the name of this committer.- Returns:
- the committer name.
-
getUUID
The Job UUID, as passed in or generated.- Returns:
- the UUID for the job.
-
getUUIDSource
Source of the UUID.- Returns:
- how the job UUID was retrieved/generated.
-
toString
- Overrides:
toStringin classorg.apache.hadoop.mapreduce.lib.output.PathOutputCommitter
-
getDestinationFS
protected org.apache.hadoop.fs.FileSystem getDestinationFS(org.apache.hadoop.fs.Path out, org.apache.hadoop.conf.Configuration config) throws IOException Get the destination filesystem from the output path and the configuration.- Parameters:
out- output pathconfig- job/task config- Returns:
- the associated FS
- Throws:
PathCommitException- output path isn't to an S3A FS instance.IOException- failure to instantiate the FS.
-
requiresDelayedCommitOutputInFileSystem
protected boolean requiresDelayedCommitOutputInFileSystem()Flag to indicate whether or not the destination filesystem needs to be configured to support magic paths where the output isn't immediately visible. If the committer returns true, then committer setup will fail if the FS doesn't have the capability. Base implementation returns false.- Returns:
- what the requirements of the committer are of the filesystem.
-
recoverTask
public void recoverTask(org.apache.hadoop.mapreduce.TaskAttemptContext taskContext) throws IOException Task recovery considered Unsupported: Warn and fail.- Overrides:
recoverTaskin classorg.apache.hadoop.mapreduce.OutputCommitter- Parameters:
taskContext- Context of the task whose output is being recovered- Throws:
IOException- always.
-
maybeCreateSuccessMarkerFromCommits
protected SuccessData maybeCreateSuccessMarkerFromCommits(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) throws IOException if the job requires a success marker on a successful job, create the fileCommitConstants._SUCCESS. While the classic committers create a 0-byte file, the S3A committers PUT up a the contents of aSuccessDatafile.- Parameters:
commitContext- commit contextpending- the pending commits- Returns:
- the success data, even if the marker wasn't created
- Throws:
IOException- IO failure
-
maybeCreateSuccessMarker
protected SuccessData maybeCreateSuccessMarker(org.apache.hadoop.mapreduce.JobContext context, List<String> filenames, org.apache.hadoop.fs.statistics.IOStatisticsSnapshot ioStatistics) throws IOException if the job requires a success marker on a successful job, create the_SUCCESSfile. While the classic committers create a 0-byte file, the S3A committers PUT up a the contents of aSuccessDatafile. The file is returned, even if no marker is created. This is so it can be saved to a report directory.- Parameters:
context- job contextfilenames- list of filenames.ioStatistics- any IO Statistics to include- Returns:
- the success data.
- Throws:
IOException- IO failure
-
setupJob
Base job setup (optionally) deletes the success marker and always creates the destination directory. When objects are committed that dest dir marker will inevitably be deleted; creating it now ensures there is something at the end while the job is in progress -and if nothing is created, that it is still there.The option
InternalCommitterConstants.FS_S3A_COMMITTER_UUIDis set to the job UUID; if generated locallyInternalCommitterConstants.SPARK_WRITE_UUIDis also patched. The fieldjobSetupis set to true to note that this specific committer instance was used to set up a job.- Specified by:
setupJobin classorg.apache.hadoop.mapreduce.OutputCommitter- Parameters:
context- context- Throws:
IOException- IO failure
-
setupTask
Task setup. Fails if the the UUID was generated locally, and the same committer wasn't used for job setup.- Specified by:
setupTaskin classorg.apache.hadoop.mapreduce.OutputCommitter- Throws:
PathCommitException- if the task UUID options are unsatisfied.IOException
-
getTaskAttemptFilesystem
protected org.apache.hadoop.fs.FileSystem getTaskAttemptFilesystem(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException Get the task attempt path filesystem. This may not be the same as the final destination FS, and so may not be an S3A FS.- Parameters:
context- task attempt- Returns:
- the filesystem
- Throws:
IOException- failure to instantiate
-
commitPendingUploads
protected void commitPendingUploads(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) throws IOException Commit all the pending uploads. Each file listed in the ActiveCommit instance is queued for processing in a separate thread; its contents are loaded and then (sequentially) committed. On a failure or abort of a single file's commit, all its uploads are aborted. The revert operation lists the files already committed and deletes them.- Parameters:
commitContext- commit contextpending- pending uploads- Throws:
IOException- on any failure
-
precommitCheckPendingFiles
protected void precommitCheckPendingFiles(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) throws IOException Run a precommit check that all files are loadable. This check avoids the situation where the inability to read a file only surfaces partway through the job commit, so results in the destination being tainted.- Parameters:
commitContext- commit contextpending- the pending operations- Throws:
IOException- any failure
-
initiateJobOperation
protected CommitContext initiateJobOperation(org.apache.hadoop.mapreduce.JobContext context) throws IOException Start the final job commit/abort commit operations. If configured to collect statistics, The IO StatisticsContext is reset.- Parameters:
context- job context- Returns:
- a commit context through which the operations can be invoked.
- Throws:
IOException- failure.
-
initiateTaskOperation
protected CommitContext initiateTaskOperation(org.apache.hadoop.mapreduce.JobContext context) throws IOException Start a ask commit/abort commit operations. This may have a different thread count. If configured to collect statistics, The IO StatisticsContext is reset.- Parameters:
context- job or task context- Returns:
- a commit context through which the operations can be invoked.
- Throws:
IOException- failure.
-
commitJobInternal
protected void commitJobInternal(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) throws IOException Internal Job commit operation: where the S3 requests are made (potentially in parallel).- Parameters:
commitContext- commit contextpending- pending commits- Throws:
IOException- any failure
-
abortJob
public void abortJob(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.mapreduce.JobStatus.State state) throws IOException - Overrides:
abortJobin classorg.apache.hadoop.mapreduce.OutputCommitter- Throws:
IOException
-
abortJobInternal
protected void abortJobInternal(CommitContext commitContext, boolean suppressExceptions) throws IOException The internal job abort operation; can be overridden in tests. This must clean up operations; it is called when a commit fails, as well as in anabortJob(JobContext, JobStatus.State)call. The base implementation callscleanup(CommitContext, boolean)so cleans up the filesystems and destroys the thread pool. Subclasses must always invoke this superclass method after their own operations. Creates and closes its own commit context.- Parameters:
commitContext- commit contextsuppressExceptions- should exceptions be suppressed?- Throws:
IOException- any IO problem raised when suppressExceptions is false.
-
abortPendingUploadsInCleanup
protected void abortPendingUploadsInCleanup(boolean suppressExceptions, CommitContext commitContext) throws IOException Abort all pending uploads to the destination directory during job cleanup operations. Note: this instantiates the thread pool if required -so- Parameters:
suppressExceptions- should exceptions be suppressedcommitContext- commit context- Throws:
IOException- IO problem
-
preCommitJob
@VisibleForTesting public void preCommitJob(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending) throws IOException Subclass-specific pre-Job-commit actions. The staging committers all load the pending files to verify that they can be loaded. The Magic committer does not, because of the overhead of reading files from S3 makes it too expensive.- Parameters:
commitContext- commit contextpending- the pending operations- Throws:
IOException- any failure
-
commitJob
Commit work. This consists of two stages: precommit and commit.Precommit: identify pending uploads, then allow subclasses to validate the state of the destination and the pending uploads. Any failure here triggers an abort of all pending uploads.
Commit internal: do the final commit sequence.
The final commit action is to build the
_SUCCESSfile entry.- Overrides:
commitJobin classorg.apache.hadoop.mapreduce.OutputCommitter- Parameters:
context- job context- Throws:
IOException- any failure
-
jobCompleted
protected void jobCompleted(boolean success) Job completion outcome; this may be subclassed in tests.- Parameters:
success- did the job succeed.
-
cleanupStagingDirs
public abstract void cleanupStagingDirs()Clean up any staging directories. IOEs must be caught and swallowed. -
listPendingUploadsToCommit
protected abstract AbstractS3ACommitter.ActiveCommit listPendingUploadsToCommit(CommitContext commitContext) throws IOException Get the list of pending uploads for this job attempt.- Parameters:
commitContext- commit context- Returns:
- a list of pending uploads.
- Throws:
IOException- Any IO failure
-
cleanup
Cleanup the job context, including aborting anything pending and destroying the thread pool.- Parameters:
commitContext- commit contextsuppressExceptions- should exceptions be suppressed?- Throws:
IOException- any failure if exceptions were not suppressed.
-
cleanupJob
- Overrides:
cleanupJobin classorg.apache.hadoop.mapreduce.OutputCommitter- Throws:
IOException
-
maybeIgnore
protected void maybeIgnore(boolean suppress, String action, org.apache.hadoop.util.functional.InvocationRaisingIOE operation) throws IOException Execute an operation; maybe suppress any raised IOException.- Parameters:
suppress- should raised IOEs be suppressed?action- action (for logging when the IOE is supressed.operation- operation- Throws:
IOException- if operation raised an IOE and suppress == false
-
maybeIgnore
Log or rethrow a caught IOException.- Parameters:
suppress- should raised IOEs be suppressed?action- action (for logging when the IOE is suppressed.ex- exception- Throws:
IOException- if suppress == false
-
getCommitOperations
Get the commit actions instance. Subclasses may provide a mock version of this.- Returns:
- the commit actions instance to use for operations.
-
getRole
Used in logging and reporting to help disentangle messages.- Returns:
- the committer's role.
-
deleteTaskAttemptPathQuietly
protected void deleteTaskAttemptPathQuietly(org.apache.hadoop.mapreduce.TaskAttemptContext context) Delete the task attempt path without raising any errors.- Parameters:
context- task context
-
abortPendingUploads
protected void abortPendingUploads(CommitContext commitContext, List<SinglePendingCommit> pending, boolean suppressExceptions) throws IOException Abort all pending uploads in the list. This operation is used by the magic committer as part of its rollback after a failure during task commit.- Parameters:
commitContext- commit contextpending- pending uploadssuppressExceptions- should exceptions be suppressed- Throws:
IOException- any exception raised
-
abortPendingUploads
protected void abortPendingUploads(CommitContext commitContext, AbstractS3ACommitter.ActiveCommit pending, boolean suppressExceptions, boolean deleteRemoteFiles) throws IOException Abort all pending uploads in the list.- Parameters:
commitContext- commit contextpending- pending uploadssuppressExceptions- should exceptions be suppressed?deleteRemoteFiles- should remote files be deleted?- Throws:
IOException- any exception raised
-
getIOStatistics
public org.apache.hadoop.fs.statistics.IOStatistics getIOStatistics()- Specified by:
getIOStatisticsin interfaceorg.apache.hadoop.fs.statistics.IOStatisticsSource
-
warnOnActiveUploads
protected void warnOnActiveUploads(org.apache.hadoop.fs.Path path) Scan for active uploads and list them along with a warning message. Errors are ignored.- Parameters:
path- output path of job.
-
buildJobUUID
public static org.apache.commons.lang3.tuple.Pair<String,AbstractS3ACommitter.JobUUIDSource> buildJobUUID(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.JobID jobId) throws PathCommitException Build the job UUID.In MapReduce jobs, the application ID is issued by YARN, and unique across all jobs.
Spark will use a fake app ID based on the current time. This can lead to collisions on busy clusters unless the specific spark release has SPARK-33402 applied. This appends a random long value to the timestamp, so is unique enough that the risk of collision is almost nonexistent.
The order of selection of a uuid is
- Value of
InternalCommitterConstants.FS_S3A_COMMITTER_UUID. - Value of
InternalCommitterConstants.SPARK_WRITE_UUID. - If enabled through
CommitConstants.FS_S3A_COMMITTER_GENERATE_UUID: Self-generated uuid. - If
CommitConstants.FS_S3A_COMMITTER_REQUIRE_UUIDis not set: Application ID
In MapReduce jobs, the application ID is issued by YARN, and unique across all jobs.
InsetupJob(JobContext)the job context's configuration will be patched be valid in all sequences where the job has been set up for the configuration passed in.If the option
CommitConstants.FS_S3A_COMMITTER_REQUIRE_UUIDis set, then an external UUID MUST be passed in. This can be used to verify that the spark engine is reliably setting unique IDs for staging.- Parameters:
conf- job/task configurationjobId- job ID from YARN or spark.- Returns:
- Job UUID and source of it.
- Throws:
PathCommitException- no UUID was found and it was required
- Value of
-
updateCommonContext
protected final void updateCommonContext()Add jobID to current context. -
getAuditSpanSource
protected org.apache.hadoop.fs.store.audit.AuditSpanSource getAuditSpanSource() -
startOperation
protected org.apache.hadoop.fs.store.audit.AuditSpan startOperation(String name, @Nullable String path1, @Nullable String path2) throws IOException Start an operation; retrieve an audit span. All operation names SHOULD come fromStoreStatisticNamesorStreamStatisticNames.- Parameters:
name- operation name.path1- first path of operationpath2- second path of operation- Returns:
- a span for the audit
- Throws:
IOException- failure
-