apache/hadoop · error · IllegalArgumentException
-diff/-rdiff is valid only with -update option
Error message
-diff/-rdiff is valid only with -update option
What it means
Error "-diff/-rdiff is valid only with -update option" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java:623
throw new IllegalArgumentException("Delete missing is applicable "
+ "only with update or overwrite options");
}
if (overwrite && syncFolder) {
throw new IllegalArgumentException("Overwrite and update options are "
+ "mutually exclusive");
}
if (!syncFolder && append) {
throw new IllegalArgumentException(
"Append is valid only with update options");
}
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(View on GitHub (pinned to 2add963021)
Solutions
- Add -update when using -diff or -rdiff.
- Drop the diff options if update semantics are not wanted.
When it happens
Trigger: distcp -diff/-rdiff is specified without -update.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/5331e173ab0fe760.
Report an issue: GitHub.