{"record":{"id":"626da8c413d881d2","repo":"apache/hadoop","slug":"overwrite-and-update-options-are-mutually-exclusiv","errorCode":null,"errorMessage":"Overwrite and update options are mutually exclusive","messagePattern":"Overwrite and update options are mutually exclusive","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java","lineNumber":610,"sourceCode":"      }\n\n      if (!atomicCommit && atomicWorkPath != null) {\n        throw new IllegalArgumentException(\n            \"-tmp work-path can only be specified along with -atomic\");\n      }\n\n      if (syncFolder && atomicCommit) {\n        throw new IllegalArgumentException(\"Atomic commit can't be used with \"\n            + \"sync folder or overwrite options\");\n      }\n\n      if (deleteMissing && !(overwrite || syncFolder)) {\n        throw new IllegalArgumentException(\"Delete missing is applicable \"\n            + \"only with update or overwrite options\");\n      }\n\n      if (overwrite && syncFolder) {\n        throw new IllegalArgumentException(\"Overwrite and update options are \"\n            + \"mutually exclusive\");\n      }\n\n      if (!syncFolder && append) {\n        throw new IllegalArgumentException(\n            \"Append is valid only with update options\");\n      }\n      if (skipCRC && append) {\n        throw new IllegalArgumentException(\n            \"Append is disallowed when skipping CRC\");\n      }\n      if (!syncFolder && (useDiff || useRdiff)) {\n        throw new IllegalArgumentException(\n            \"-diff/-rdiff is valid only with -update option\");\n      }\n\n      if (useDiff || useRdiff) {\n        if (StringUtils.isBlank(fromSnapshot) ||","sourceCodeStart":592,"sourceCodeEnd":628,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java#L592-L628","documentation":"Error \"Overwrite and update options are mutually exclusive\" thrown in apache/hadoop.","triggerScenarios":"distcp is invoked with both -overwrite and -update.","commonSituations":"See trigger scenarios.","solutions":["Choose either -overwrite or -update, not both.","Use -update for incremental syncs and -overwrite for full replacement."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}