apache/hadoop · error · IOException

No namespace availaible.

Error message

No namespace availaible.

What it means

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.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ErasureCoding.java:188

    final List<RemoteLocation> locations =
        rpcServer.getLocationsForPath(src, false, false);
    RemoteMethod remoteMethod = new RemoteMethod("unsetErasureCodingPolicy",
        new Class<?>[] {String.class}, new RemoteParam());
    if (rpcServer.isInvokeConcurrent(src)) {
      rpcClient.invokeConcurrent(locations, remoteMethod);
    } else {
      rpcClient.invokeSequential(locations, remoteMethod);
    }
  }

  public ECTopologyVerifierResult getECTopologyResultForPolicies(
      String[] policyNames) throws IOException {
    RemoteMethod method = new RemoteMethod("getECTopologyResultForPolicies",
        new Class<?>[] {String[].class}, new Object[] {policyNames});
    Set<FederationNamespaceInfo> nss = namenodeResolver.getNamespaces();
    if (nss.isEmpty()) {
      throw new IOException("No namespace availaible.");
    }
    Map<FederationNamespaceInfo, ECTopologyVerifierResult> ret = rpcClient
        .invokeConcurrent(nss, method, true, false,
            ECTopologyVerifierResult.class);
    for (Map.Entry<FederationNamespaceInfo, ECTopologyVerifierResult> entry : ret
        .entrySet()) {
      if (!entry.getValue().isSupported()) {
        return entry.getValue();
      }
    }
    // If no negative result, return the result from the first namespace.
    return ret.get(nss.iterator().next());
  }

  public ECBlockGroupStats getECBlockGroupStats() throws IOException {
    rpcServer.checkOperation(OperationCategory.READ);

    RemoteMethod method = new RemoteMethod("getECBlockGroupStats");

View on GitHub (pinned to 2add963021)

Solutions

  1. Check registered namespaces: router UI membership view / dfsrouteradmin -status and state store membership records
  2. Ensure the router monitors the namenodes (dfs.federation.router.monitor.namenode entries, or local namenode registration) so namespaces appear
  3. Confirm the state store is reachable and the router has left SAFEMODE, then retry the EC command
  4. If membership is genuinely empty, register/enable the federated clusters before running EC topology checks
Defensive patterns

Strategy: retry

Try / catch

// Right after router startup, retry until membership loads
for (int i = 0; i < 10; i++) {
  try {
    return ecClient.getECTopologyResultForPolicies(policies);
  } catch (IOException e) {
    if (e.getMessage() == null || !e.getMessage().contains("No namespace")) throw e;
    Thread.sleep(2_000L);
  }
}
throw new IOException("namespaces still unavailable for EC verification");

Prevention

When it happens

Trigger: 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.

Common situations: New RBF federation before any namenode heartbeat registered; membership store cleared or expired; router restarted and cache cold; state store outage making namespaces invisible.

Related errors


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