{"record":{"id":"134c15dff871d081","repo":"apache/hadoop","slug":"no-namespace-availaible","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/ErasureCoding.java","lineNumber":188,"sourceCode":"\n    final List<RemoteLocation> locations =\n        rpcServer.getLocationsForPath(src, false, false);\n    RemoteMethod remoteMethod = new RemoteMethod(\"unsetErasureCodingPolicy\",\n        new Class<?>[] {String.class}, new RemoteParam());\n    if (rpcServer.isInvokeConcurrent(src)) {\n      rpcClient.invokeConcurrent(locations, remoteMethod);\n    } else {\n      rpcClient.invokeSequential(locations, remoteMethod);\n    }\n  }\n\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    Map<FederationNamespaceInfo, ECTopologyVerifierResult> ret = rpcClient\n        .invokeConcurrent(nss, method, true, false,\n            ECTopologyVerifierResult.class);\n    for (Map.Entry<FederationNamespaceInfo, ECTopologyVerifierResult> entry : ret\n        .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\n  public ECBlockGroupStats getECBlockGroupStats() throws IOException {\n    rpcServer.checkOperation(OperationCategory.READ);\n\n    RemoteMethod method = new RemoteMethod(\"getECBlockGroupStats\");","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ErasureCoding.java#L170-L206","documentation":"The router's ErasureCoding helper fans out getECTopologyResultForPolicies to every namespace known to the namenode resolver to verify EC policy support. If namenodeResolver.getNamespaces() returns an empty set there is no cluster to ask, and it throws IOException('No namespace availaible.' — typo in the source) before issuing any remote call.","triggerScenarios":"Router-side EC topology verification invoked when membership is empty: no namenodes registered in the state store (fresh deployment, membership records expired/wiped, state store down), or the resolver cache has not loaded yet right after router startup.","commonSituations":"New RBF federation before any namenode heartbeat registered; membership store cleared or expired; router restarted and cache cold; state store outage making namespaces invisible.","solutions":["Check registered namespaces: router UI membership view / dfsrouteradmin -status and state store membership records","Ensure the router monitors the namenodes (dfs.federation.router.monitor.namenode entries, or local namenode registration) so namespaces appear","Confirm the state store is reachable and the router has left SAFEMODE, then retry the EC command","If membership is genuinely empty, register/enable the federated clusters before running EC topology checks"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Right after router startup, retry until membership loads\nfor (int i = 0; i < 10; i++) {\n  try {\n    return ecClient.getECTopologyResultForPolicies(policies);\n  } catch (IOException e) {\n    if (e.getMessage() == null || !e.getMessage().contains(\"No namespace\")) throw e;\n    Thread.sleep(2_000L);\n  }\n}\nthrow new IOException(\"namespaces still unavailable for EC verification\");","preventionTips":["Wait for router ACTIVE state and non-empty membership before EC operations","Monitor membership record counts in the state store","Ensure at least one namenode per namespace registers with the router"],"tags":["hadoop","rbf","erasure-coding","router","namespaces","state-store"],"backgroundTag":"empty-service-registry","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}