apache/hadoop · error · IllegalArgumentException
Append is valid only with update options
Error message
Append is valid only with update options
What it means
DistCp option validation: incremental -append copying is only meaningful with -update (sync folder); append without update is rejected during validation.
Solutions
- Combine -append only with -update.
- Remove -append for non-update copies.
Defensive patterns
Strategy: validation
When it happens
Trigger: distcp -append is used without the -update option.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/fccaea913e361f24.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java:615
}
if (syncFolder && atomicCommit) {
throw new IllegalArgumentException("Atomic commit can't be used with "
+ "sync folder or overwrite options");
}
if (deleteMissing && !(overwrite || syncFolder)) {
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");
}View on GitHub (pinned to 2add963021)