{"record":{"id":"11dc907788ce32e9","repo":"apache/hadoop","slug":"namespaces-should-be-null-or-empty","errorCode":null,"errorMessage":"namespaces({}) should be null or empty","messagePattern":"namespaces\\((.+?)\\) should be null or empty","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java","lineNumber":1187,"sourceCode":"      throws IOException {\n    checkNNStartup();\n    stateChangeLog.debug(\"*DIR* NameNode.mkdirs: {}.\", src);\n    if (!checkPathLength(src)) {\n      throw new IOException(\"mkdirs: Pathname too long.  Limit \" \n                            + MAX_PATH_LENGTH + \" characters, \" + MAX_PATH_DEPTH + \" levels.\");\n    }\n    return namesystem.mkdirs(src,\n        new PermissionStatus(getRemoteUser().getShortUserName(),\n            null, masked), createParent);\n  }\n\n  @Override // ClientProtocol\n  public void renewLease(String clientName, List<String> namespaces)\n      throws IOException {\n    if (namespaces != null && namespaces.size() > 0) {\n      LOG.warn(\"namespaces({}) should be null or empty \"\n          + \"on NameNode side, please check it.\", namespaces);\n      throw new IOException(\"namespaces(\" + namespaces\n          + \") should be null or empty\");\n    }\n    checkNNStartup();\n    namesystem.renewLease(clientName);        \n  }\n\n  @Override // ClientProtocol\n  public DirectoryListing getListing(String src, byte[] startAfter,\n      boolean needLocation) throws IOException {\n    checkNNStartup();\n    DirectoryListing files = namesystem.getListing(\n        src, startAfter, needLocation);\n    if (files != null) {\n      metrics.incrGetListingOps();\n      metrics.incrFilesInGetListingOps(files.getPartialListing().length);\n    }\n    return files;\n  }","sourceCodeStart":1169,"sourceCodeEnd":1205,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java#L1169-L1205","documentation":"Error \"namespaces({}) should be null or empty\" thrown in apache/hadoop.","triggerScenarios":"A client invokes mkdirs with a non-empty namespaces list on an API that forbids it.","commonSituations":"Calling an internal multi-namespace mkdirs RPC variant with populated namespaces.","solutions":["Pass null or an empty namespaces argument; this mkdirs overload does not accept namespace parameters."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}