{"record":{"id":"9a0c37b42a4d6b22","repo":"apache/hadoop","slug":"must-provide-both-the-starting-and-ending-snapshot","errorCode":null,"errorMessage":"Must provide both the starting and ending snapshot names for -diff/-rdiff","messagePattern":"Must provide both the starting and ending snapshot names for -diff/-rdiff","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java","lineNumber":630,"sourceCode":"      }\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) ||\n            StringUtils.isBlank(toSnapshot)) {\n          throw new IllegalArgumentException(\n              \"Must provide both the starting and ending \" +\n                  \"snapshot names for -diff/-rdiff\");\n        }\n      }\n      if (useDiff && useRdiff) {\n        throw new IllegalArgumentException(\n            \"-diff and -rdiff are mutually exclusive\");\n      }\n\n      if (verboseLog && logPath == null) {\n        throw new IllegalArgumentException(\n            \"-v is valid only with -log option\");\n      }\n    }\n\n    @VisibleForTesting\n    Builder withSourcePaths(List<Path> newSourcePaths) {\n      this.sourcePaths = newSourcePaths;","sourceCodeStart":612,"sourceCodeEnd":648,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java#L612-L648","documentation":"Error \"Must provide both the starting and ending snapshot names for -diff/-rdiff\" thrown in apache/hadoop.","triggerScenarios":"distcp -diff/-rdiff is run without both snapshot name arguments.","commonSituations":"See trigger scenarios.","solutions":["Provide both starting and ending snapshot names to -diff/-rdiff.","Create the snapshots on the source/target before running."],"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"}