{"record":{"id":"3f50c0fb7f9c5f22","repo":"apache/hadoop","slug":"not-implemented","errorCode":null,"errorMessage":"Not implemented","messagePattern":"Not implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java","lineNumber":969,"sourceCode":"    }\n\n    if (!namenodeListingExists && nnListing.size() == 0 && children == null) {\n      // NN returns a null object if the directory cannot be found and has no\n      // listing. If we didn't retrieve any NN listing data, and there are no\n      // mount points here, return null.\n      return null;\n    }\n\n    // Generate combined listing\n    HdfsFileStatus[] combinedData = new HdfsFileStatus[nnListing.size()];\n    combinedData = nnListing.values().toArray(combinedData);\n    return new DirectoryListing(combinedData, remainingEntries);\n  }\n\n  @Override\n  public BatchedDirectoryListing getBatchedListing(String[] srcs,\n      byte[] startAfter, boolean needLocation) throws IOException {\n    throw new UnsupportedOperationException(\"Not implemented\");\n  }\n\n  @Override\n  public HdfsFileStatus getFileInfo(String src) throws IOException {\n    rpcServer.checkOperation(NameNode.OperationCategory.READ);\n\n    HdfsFileStatus ret = null;\n    IOException noLocationException = null;\n    try {\n      final List<RemoteLocation> locations = rpcServer.getLocationsForPath(src, false, false);\n      RemoteMethod method = new RemoteMethod(\"getFileInfo\",\n          new Class<?>[] {String.class}, new RemoteParam());\n\n      // If it's a directory, we check in all locations\n      if (rpcServer.isPathAll(src)) {\n        ret = getFileInfoAll(locations, method);\n      } else {\n        // Check for file information sequentially","sourceCodeStart":951,"sourceCodeEnd":987,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java#L951-L987","documentation":"RouterClientProtocol.getBatchedListing() is declared in ClientProtocol but the Router throws UnsupportedOperationException('Not implemented') unconditionally. The Router implements listing via getListing() (iterating namespaces and merging results) but the batched listing extension is not routed, so any client that negotiates/uses batched listings against an RBF endpoint fails.","triggerScenarios":"A client (newer HDFS client or library using ClientProtocol#getBatchedListing) calling the Router's RPC port with batched directory listing enabled; experimental clients/libHDFS builds that prefer BatchedDirectoryListing over getListing.","commonSituations":"Newer Hadoop client version talking to an older Router that predates or skipped the batched-listing feature; third-party tooling using raw ClientProtocol proxies against RBF.","solutions":["Disable batched listing on the client so it falls back to getListing (e.g. keep client/RPC features compatible or use a client version matching the Router)","Upgrade the Router (hadoop-hdfs-rbf) to a version implementing getBatchedListing, if available","Point clients needing batched listings directly at a real NameNode namespace instead of the Router"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Feature-probe before using batched listing via Router\ntry {\n  clientProtocol.getBatchedListing(new String[]{\"/\"}, HdfsFileStatus.EMPTY_NAME, false);\n} catch (UnsupportedOperationException e) {\n  useBatched = false; // fall back to getListing()\n}","typeGuard":null,"tryCatchPattern":"try {\n  BatchedDirectoryListing b = clientProtocol.getBatchedListing(srcs, startAfter, needLocation);\n} catch (UnsupportedOperationException e) {\n  // Router does not implement batched listing: fall back to getListing()\n  DirectoryListing d = clientProtocol.getListing(src, startAfter, needLocation);\n}","preventionTips":["Match client Hadoop version to the Router's supported ClientProtocol surface","Implement getListing fallback in any client library that uses batched listings","Track HDFS jiras for Router batched-listing support before adopting the feature"],"tags":["hdfs","router-based-federation","batched-listing","unsupported-operation","version-compat"],"backgroundTag":"unsupported-operation","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}