apache/hadoop · error · UnsupportedOperationException

The target file system " + tgtFs.getScheme() + " does not…

Error message

The target file system " + tgtFs.getScheme() + " does not support getSnapshotDiffReport

What it means

DistCpSync capability check: the target FileSystem class lacks a getSnapshotDiffReport method, so target-side diff computation for -diff/-rdiff sync is impossible.

Solutions

  1. Use a target filesystem that supports getSnapshotDiffReport (HDFS).
  2. Disable diff-based sync for this target.
Defensive patterns

Strategy: validation

When it happens

Trigger: The target filesystem does not implement getSnapshotDiffReport.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/83b047f5b645d556. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpSync.java:184

    }
    if (!tgtFs.hasPathCapability(targetDir,
        CommonPathCapabilities.FS_SNAPSHOTS)) {
      throw new UnsupportedOperationException(
          "The target file system " + tgtFs.getScheme()
              + " does not support snapshot.");
    }
    try {
      getSnapshotDiffReportMethod(srcFs);
    } catch (NoSuchMethodException e) {
      throw new UnsupportedOperationException(
          "The source file system " + srcFs.getScheme()
              + " does not support getSnapshotDiffReport",
          e);
    }
    try {
      getSnapshotDiffReportMethod(tgtFs);
    } catch (NoSuchMethodException e) {
      throw new UnsupportedOperationException(
          "The target file system " + tgtFs.getScheme()
              + " does not support getSnapshotDiffReport",
          e);
    }

  }

  public boolean sync() throws IOException {
    if (!preSyncCheck()) {
      return false;
    }

    if (!getAllDiffs()) {
      return false;
    }

    List<Path> sourcePaths = context.getSourcePaths();
    final Path sourceDir = sourcePaths.get(0);

View on GitHub (pinned to 2add963021)