{"record":{"id":"e48140c8d7dd54f7","repo":"apache/hadoop","slug":"v-is-valid-only-with-log-option","errorCode":null,"errorMessage":"-v is valid only with -log option","messagePattern":"-v is valid only with -log option","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java","lineNumber":641,"sourceCode":"        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;\n      return this;\n    }\n\n    public Builder withAtomicCommit(boolean newAtomicCommit) {\n      this.atomicCommit = newAtomicCommit;\n      return this;\n    }\n\n    public Builder withAtomicWorkPath(Path newAtomicWorkPath) {\n      this.atomicWorkPath = newAtomicWorkPath;\n      return this;","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java#L623-L659","documentation":"Error \"-v is valid only with -log option\" thrown in apache/hadoop.","triggerScenarios":"distcp -v is used without the -log option.","commonSituations":"See trigger scenarios.","solutions":["Specify -log <dir> together with -v (verbose).","Drop -v if no log output directory is needed."],"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"}