apache/hadoop · error · IOException

namespaces({}) should be null or empty

Error message

namespaces({}) should be null or empty

What it means

Error "namespaces({}) should be null or empty" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:1187

      throws IOException {
    checkNNStartup();
    stateChangeLog.debug("*DIR* NameNode.mkdirs: {}.", src);
    if (!checkPathLength(src)) {
      throw new IOException("mkdirs: Pathname too long.  Limit " 
                            + MAX_PATH_LENGTH + " characters, " + MAX_PATH_DEPTH + " levels.");
    }
    return namesystem.mkdirs(src,
        new PermissionStatus(getRemoteUser().getShortUserName(),
            null, masked), createParent);
  }

  @Override // ClientProtocol
  public void renewLease(String clientName, List<String> namespaces)
      throws IOException {
    if (namespaces != null && namespaces.size() > 0) {
      LOG.warn("namespaces({}) should be null or empty "
          + "on NameNode side, please check it.", namespaces);
      throw new IOException("namespaces(" + namespaces
          + ") should be null or empty");
    }
    checkNNStartup();
    namesystem.renewLease(clientName);        
  }

  @Override // ClientProtocol
  public DirectoryListing getListing(String src, byte[] startAfter,
      boolean needLocation) throws IOException {
    checkNNStartup();
    DirectoryListing files = namesystem.getListing(
        src, startAfter, needLocation);
    if (files != null) {
      metrics.incrGetListingOps();
      metrics.incrFilesInGetListingOps(files.getPartialListing().length);
    }
    return files;
  }

View on GitHub (pinned to 2add963021)

Solutions

  1. Pass null or an empty namespaces argument; this mkdirs overload does not accept namespace parameters.

When it happens

Trigger: A client invokes mkdirs with a non-empty namespaces list on an API that forbids it.

Common situations: Calling an internal multi-namespace mkdirs RPC variant with populated namespaces.


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