apache/hadoop · error · IllegalArgumentException
-diff and -rdiff are mutually exclusive
Error message
-diff and -rdiff are mutually exclusive
What it means
Error "-diff and -rdiff are mutually exclusive" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java:636
if (skipCRC && append) {
throw new IllegalArgumentException(
"Append is disallowed when skipping CRC");
}
if (!syncFolder && (useDiff || useRdiff)) {
throw new IllegalArgumentException(
"-diff/-rdiff is valid only with -update option");
}
if (useDiff || useRdiff) {
if (StringUtils.isBlank(fromSnapshot) ||
StringUtils.isBlank(toSnapshot)) {
throw new IllegalArgumentException(
"Must provide both the starting and ending " +
"snapshot names for -diff/-rdiff");
}
}
if (useDiff && useRdiff) {
throw new IllegalArgumentException(
"-diff and -rdiff are mutually exclusive");
}
if (verboseLog && logPath == null) {
throw new IllegalArgumentException(
"-v is valid only with -log option");
}
}
@VisibleForTesting
Builder withSourcePaths(List<Path> newSourcePaths) {
this.sourcePaths = newSourcePaths;
return this;
}
public Builder withAtomicCommit(boolean newAtomicCommit) {
this.atomicCommit = newAtomicCommit;
return this;View on GitHub (pinned to 2add963021)
Solutions
- Use either -diff or -rdiff, not both.
- Use -rdiff for reverse diff from target, -diff from source.
When it happens
Trigger: distcp is invoked with both -diff and -rdiff.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/c4ce3e8ab74add4f.
Report an issue: GitHub.