Skip to content

Commit 3424214

Browse files
authored
MAPREDUCE-7448. Skipping cleanup with FileOutputCommitter V1 can corrupt output: warn and document (#6038)
* update documentation for mapreduce committer * add warning if the user attempts to use FileOutputCommiter V1 with skipping cleanup Contributed by ConfX
1 parent 3907243 commit 3424214

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ public FileOutputCommitter(Path outputPath,
158158
"output directory:" + skipCleanup + ", ignore cleanup failures: " +
159159
ignoreCleanupFailures);
160160

161+
if (algorithmVersion == 1 && skipCleanup) {
162+
LOG.warn("Skip cleaning up when using FileOutputCommitter V1 can lead to unexpected behaviors. " +
163+
"For example, committing several times may be allowed falsely.");
164+
}
165+
161166
if (outputPath != null) {
162167
FileSystem fs = outputPath.getFileSystem(context.getConfiguration());
163168
this.outputPath = fs.makeQualified(outputPath);

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/site/markdown/manifest_committer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Here are the main configuration options of the committer.
202202

203203
There are some more, as covered in the (Advanced)[#advanced] section.
204204

205+
WARNING: setting `mapreduce.fileoutputcommitter.cleanup.skipped` to `true` is not compatible with version 1 of the committer and can cause unexpected behaviors.
205206

206207
## <a name="scaling"></a> Scaling jobs `mapreduce.manifest.committer.io.threads`
207208

0 commit comments

Comments
 (0)