{"record":{"id":"a3f6f433a7f7e103","repo":"apache/hadoop","slug":"getsnapshotdifflisting-is-not-supported-for-httpfs","errorCode":null,"errorMessage":"getSnapshotDiffListing is not supported for HttpFs on {0}. Please check your fs.defaultFS configuration","messagePattern":"getSnapshotDiffListing is not supported for HttpFs on (.+?)\\. Please check your fs\\.defaultFS configuration","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":400,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java","lineNumber":1952,"sourceCode":"    }\n\n    /**\n     * Executes the filesystem operation.\n     *\n     * @param fs filesystem instance to use.\n     * @return A serialized JSON string of snapshot diffs.\n     * @throws IOException thrown if an IO error occurred.\n     */\n    @Override\n    public String execute(FileSystem fs) throws IOException {\n      SnapshotDiffReportListing snapshotDiffReportListing = null;\n      if (fs instanceof DistributedFileSystem) {\n        DistributedFileSystem dfs = (DistributedFileSystem) fs;\n        snapshotDiffReportListing =\n            dfs.getSnapshotDiffReportListing(path, oldSnapshotName, snapshotName,\n                snapshotDiffStartPath, snapshotDiffIndex);\n      } else {\n        throw new UnsupportedOperationException(\"getSnapshotDiffListing is not \"\n            + \"supported for HttpFs on \" + fs.getClass()\n            + \". Please check your fs.defaultFS configuration\");\n      }\n      if (snapshotDiffReportListing != null) {\n        return JsonUtil.toJsonString(snapshotDiffReportListing);\n      } else {\n        return \"\";\n      }\n    }\n  }\n\n  /**\n   *  Executor that performs a getSnapshottableDirListing operation.\n   */\n  @InterfaceAudience.Private\n  public static class FSGetSnapshottableDirListing implements\n      FileSystemAccess.FileSystemExecutor<String> {\n","sourceCodeStart":1934,"sourceCodeEnd":1970,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java#L1934-L1970","documentation":"FSOperations.FSGetSnapshotDiffListing.execute() implements the paged GETSNAPSHOTDIFFLISTING via DistributedFileSystem.getSnapshotDiffReportListing() only; no generic FileSystem equivalent exists. On a non-HDFS backing filesystem the executor throws UnsupportedOperationException (HTTP 400 at the REST layer), pointing at the HttpFS server's fs.defaultFS configuration.","triggerScenarios":"Client sends op=GETSNAPSHOTDIFFLISTING with snapshotdiffstartpath/snapshotdiffindex pagination params through HttpFS whose backing filesystem is not DistributedFileSystem.","commonSituations":"Incremental-diff tooling (e.g., HDFS replication/distcp difference viewers) configured with an HttpFS URL on a gateway backed by local or object storage; server config drift after migration off HDFS.","solutions":["Point the HttpFS server's fs.defaultFS at HDFS (hdfs://nameservice) and restart it","Reconfigure the diff tool to use WebHDFS directly against the NameNode","Audit httpfs-site.xml and the HttpFS process environment for a stale or missing fs.defaultFS","Feature-detect at startup: if GETSNAPSHOTDIFFLISTING returns this error, disable paged diff UI instead of retrying"],"exampleFix":"<!-- before: httpfs-site.xml -->\n<property><name>fs.defaultFS</name><value>file:///</value></property>\n<!-- after -->\n<property><name>fs.defaultFS</name><value>hdfs://ns1</value></property>\n<!-- restart HttpFS; paged snapshot diff listing then works -->","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"static DistributedFileSystem asDfs(FileSystem fs) {\n  return fs instanceof DistributedFileSystem ? (DistributedFileSystem) fs : null;\n}","tryCatchPattern":"try {\n  SnapshotDiffReportListing l = fs.getSnapshotDiffReportListing(path, oldSnap, newSnap, startPath, 0);\n} catch (IOException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"not supported for HttpFs\")) {\n    throw new UnsupportedFeatureException(\"paged snapshot diff needs HDFS-backed HttpFS\", e);\n  }\n  throw e;\n}","preventionTips":["Point paged-diff clients at WebHDFS on the NameNode","Health-check gateways with a DFS-only op before enabling diff pagination in UIs","Track which HttpFS endpoints are HDFS-backed in service metadata, not folklore"],"tags":["httpfs","webhdfs","snapshot-diff","pagination","unsupported-operation","fs-defaultfs"],"backgroundTag":"unsupported-filesystem-operation","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}