{"record":{"id":"203b6d7235ffd285","repo":"apache/hadoop","slug":"tmp-work-path-can-only-be-specified-along-with-a","errorCode":null,"errorMessage":"-tmp work-path can only be specified along with -atomic","messagePattern":"-tmp work-path can only be specified along with -atomic","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java","lineNumber":595,"sourceCode":"      LOG.info(\"Enabling preserving blocksize since \"\n          + DistCpOptionSwitch.BLOCKS_PER_CHUNK.getSwitch() + \" is passed.\");\n      preserve(FileAttribute.BLOCKSIZE);\n\n      LOG.info(\"Set \" + DistCpOptionSwitch.APPEND.getSwitch()\n          + \" 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","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java#L577-L613","documentation":"Error \"-tmp work-path can only be specified along with -atomic\" thrown in apache/hadoop.","triggerScenarios":"distcp is given a -tmp work path without the -atomic option.","commonSituations":"See trigger scenarios.","solutions":["Add -atomic when specifying -tmp, or drop -tmp.","Use a default temp path under the target if atomic commit is not required."],"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"}