apache/hadoop · error · IllegalArgumentException
Failed to invoke getSnapshotDiffReport.
Error message
Failed to invoke getSnapshotDiffReport.
What it means
Wrap raised when the reflective invocation of getSnapshotDiffReport on the filesystem failed with an invocation target exception; the real server/FS error is carried as the cause for diagnosis.
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.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: The getSnapshotDiffReport RPC fails during distcp sync.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/b9260fef2b6a3e7c.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpSync.java:327
"getSnapshotDiffReport", Path.class, String.class, String.class);
}
/**
* Get the snapshotDiff b/w the fromSnapshot & toSnapshot for the given
* filesystem.
*/
private static SnapshotDiffReport getSnapshotDiffReport(
final FileSystem fs,
final Path snapshotDir,
final String fromSnapshot,
final String toSnapshot) throws IOException {
try {
return (SnapshotDiffReport) getSnapshotDiffReportMethod(fs).invoke(
fs, snapshotDir, fromSnapshot, toSnapshot);
} catch (InvocationTargetException e) {
throw new IOException(e.getCause());
} catch (NoSuchMethodException|IllegalAccessException e) {
throw new IllegalArgumentException(
"Failed to invoke getSnapshotDiffReport.", e);
}
}
private String getSnapshotName(String name) {
return Path.CUR_DIR.equals(name) ? "" : name;
}
private Path getSnapshotPath(Path inputDir, String snapshotName) {
if (Path.CUR_DIR.equals(snapshotName)) {
return inputDir;
} else {
return new Path(inputDir,
HdfsConstants.DOT_SNAPSHOT_DIR + Path.SEPARATOR + snapshotName);
}
}
private Path createTargetTmpDir(FileSystem targetFs,View on GitHub (pinned to 2add963021)