{"record":{"id":"4c7ecfc6fb30df58","repo":"apache/hadoop","slug":"no-namespace-availaible-4c7ecf","errorCode":null,"errorMessage":"No namespace availaible.","messagePattern":"No namespace availaible\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/AsyncErasureCoding.java","lineNumber":211,"sourceCode":"  /**\n   * Asynchronously get the EC topology result for the given policies.\n   * This method checks the operation category and then invokes the\n   * getECTopologyResultForPolicies method concurrently across all namespaces.\n   * <p>\n   * The results are merged and the first unsupported result is returned.\n   *\n   * @param policyNames Array of policy names to check.\n   * @return ECTopologyVerifierResult for the policies.\n   * @throws IOException If an I/O error occurs.\n   */\n  @Override\n  public ECTopologyVerifierResult getECTopologyResultForPolicies(\n      String[] policyNames) throws IOException {\n    RemoteMethod method = new RemoteMethod(\"getECTopologyResultForPolicies\",\n        new Class<?>[] {String[].class}, new Object[] {policyNames});\n    Set<FederationNamespaceInfo> nss = namenodeResolver.getNamespaces();\n    if (nss.isEmpty()) {\n      throw new IOException(\"No namespace availaible.\");\n    }\n\n    rpcClient.invokeConcurrent(nss, method, true, false,\n        ECTopologyVerifierResult.class);\n    asyncApply((ApplyFunction<Map<FederationNamespaceInfo, ECTopologyVerifierResult>,\n        ECTopologyVerifierResult>) ret -> {\n        for (Map.Entry<FederationNamespaceInfo, ECTopologyVerifierResult> entry :\n            ret.entrySet()) {\n            if (!entry.getValue().isSupported()) {\n              return entry.getValue();\n            }\n          }\n        // If no negative result, return the result from the first namespace.\n        return ret.get(nss.iterator().next());\n      });\n    return asyncReturn(ECTopologyVerifierResult.class);\n  }\n","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/AsyncErasureCoding.java#L193-L229","documentation":"AsyncErasureCoding.getECTopologyResultForPolicies (async RBF path, used when clients call the Router with the async RPC router mode) checks the membership table before verifying EC policies: if namenodeResolver.getNamespaces() returns an empty set it throws IOException('No namespace availaible.') (typo is in the source). With no registered namespaces there is no NameNode to answer the EC topology query, so the call cannot proceed.","triggerScenarios":"Any EC-related client call (e.g. hdfs erasurecode or setErasureCodingPolicy flows reaching getECTopologyResultForPolicies) when the State Store membership table is empty; NameNode heartbeats never registered; Router pointed at the wrong State Store.","commonSituations":"Fresh RBF setup where NN federation heartbeats are not yet configured/sent; State Store (ZK) quorum down so membership reads return nothing; router.namenode.resolver pointing at a store without membership records.","solutions":["Verify membership: hdfs dfsrouteradmin -getNamespaceInfo should list all namespaces; if empty, fix NameNode-to-Router heartbeat configuration (dfs.federation.router.* on the NN side) so namespaces register","Check State Store connectivity and health from the Router (safemode status, router logs for StateStoreUnavailableException)","Retry after namespaces are registered; the call succeeds once the membership table is populated"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Ops precheck: hdfs dfsrouteradmin -getNamespaceInfo\n// must list namespaces before issuing EC calls through the Router.","typeGuard":null,"tryCatchPattern":"catch (IOException e) {\n  if (e.getMessage().equals(\"No namespace availaible.\")) {\n    // membership table empty: fix NN heartbeats / State Store, then retry\n  }\n}","preventionTips":["Verify membership registration (getNamespaceInfo) as part of Router bring-up checklists","Monitor State Store availability; an unreachable store empties the membership view","Delay EC-dependent jobs until the Router reports all namespaces registered"],"tags":["hadoop","hdfs","rbf","erasure-coding","state-store","membership","async-rpc"],"backgroundTag":"no-namespace-registered","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}