{"record":{"id":"b9260fef2b6a3e7c","repo":"apache/hadoop","slug":"failed-to-invoke-getsnapshotdiffreport","errorCode":null,"errorMessage":"Failed to invoke getSnapshotDiffReport.","messagePattern":"Failed to invoke getSnapshotDiffReport\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpSync.java","lineNumber":327,"sourceCode":"        \"getSnapshotDiffReport\", Path.class, String.class, String.class);\n  }\n\n  /**\n   * Get the snapshotDiff b/w the fromSnapshot & toSnapshot for the given\n   * filesystem.\n   */\n  private static SnapshotDiffReport getSnapshotDiffReport(\n      final FileSystem fs,\n      final Path snapshotDir,\n      final String fromSnapshot,\n      final String toSnapshot) throws IOException {\n    try {\n      return (SnapshotDiffReport) getSnapshotDiffReportMethod(fs).invoke(\n          fs, snapshotDir, fromSnapshot, toSnapshot);\n    } catch (InvocationTargetException e) {\n      throw new IOException(e.getCause());\n    } catch (NoSuchMethodException|IllegalAccessException e) {\n      throw new IllegalArgumentException(\n          \"Failed to invoke getSnapshotDiffReport.\", e);\n    }\n  }\n\n  private String getSnapshotName(String name) {\n    return Path.CUR_DIR.equals(name) ? \"\" : name;\n  }\n\n  private Path getSnapshotPath(Path inputDir, String snapshotName) {\n    if (Path.CUR_DIR.equals(snapshotName)) {\n      return inputDir;\n    } else {\n      return new Path(inputDir,\n          HdfsConstants.DOT_SNAPSHOT_DIR + Path.SEPARATOR + snapshotName);\n    }\n  }\n\n  private Path createTargetTmpDir(FileSystem targetFs,","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpSync.java#L309-L345","documentation":"Error \"Failed to invoke getSnapshotDiffReport.\" thrown in apache/hadoop.","triggerScenarios":"The getSnapshotDiffReport RPC fails during distcp sync.","commonSituations":"See trigger scenarios.","solutions":["Check NameNode logs and permissions for snapshot diff on the directory.","Verify both snapshots exist and the caller has access.","Retry; transient RPC failures can cause this."],"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"}