{"record":{"id":"04df50412e856408","repo":"apache/hadoop","slug":"atomic-commit-can-t-be-used-with-sync-folder-or-ov","errorCode":null,"errorMessage":"Atomic commit can't be used with sync folder or overwrite options","messagePattern":"Atomic commit can't be used with sync folder or overwrite options","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java","lineNumber":600,"sourceCode":"          + \" to false since \" + DistCpOptionSwitch.BLOCKS_PER_CHUNK.getSwitch()\n          + \" is passed.\");\n      this.append = false;\n    }\n\n    private void validate() {\n      if ((useDiff || useRdiff) && deleteMissing) {\n        // -delete and -diff/-rdiff are mutually exclusive.\n        throw new IllegalArgumentException(\"-delete and -diff/-rdiff are \"\n            + \"mutually exclusive. The -delete option will be ignored.\");\n      }\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) {","sourceCodeStart":582,"sourceCodeEnd":618,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java#L582-L618","documentation":"Error \"Atomic commit can't be used with sync folder or overwrite options\" thrown in apache/hadoop.","triggerScenarios":"distcp combines -atomic with -update/-overwrite or sync folder options.","commonSituations":"See trigger scenarios.","solutions":["Remove -atomic when using -update or -overwrite, or drop those options to keep atomic commit.","Choose one copy semantics per run."],"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-23T01:17:44.959Z"}