{"record":{"id":"401ce6d822ea57bc","repo":"apache/hadoop","slug":"cachemanager-section-had-no-numpools","errorCode":null,"errorMessage":"CacheManager section had no <numPools>","messagePattern":"CacheManager section had no <numPools>","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java","lineNumber":1085,"sourceCode":"\n  private class CacheManagerSectionProcessor implements SectionProcessor {\n    static final String NAME = \"CacheManagerSection\";\n\n    @Override\n    public void process() throws IOException {\n      Node node = new Node();\n      loadNodeChildren(node, \"CacheManager fields\", \"pool\", \"directive\");\n      CacheManagerSection.Builder b =  CacheManagerSection.newBuilder();\n      Long nextDirectiveId =\n          node.removeChildLong(CACHE_MANAGER_SECTION_NEXT_DIRECTIVE_ID);\n      if (nextDirectiveId == null) {\n        throw new IOException(\"CacheManager section had no <nextDirectiveId>\");\n      }\n      b.setNextDirectiveId(nextDirectiveId);\n      Integer expectedNumPools =\n          node.removeChildInt(CACHE_MANAGER_SECTION_NUM_POOLS);\n      if (expectedNumPools == null) {\n        throw new IOException(\"CacheManager section had no <numPools>\");\n      }\n      b.setNumPools(expectedNumPools);\n      Integer expectedNumDirectives =\n          node.removeChildInt(CACHE_MANAGER_SECTION_NUM_DIRECTIVES);\n      if (expectedNumDirectives == null) {\n        throw new IOException(\"CacheManager section had no <numDirectives>\");\n      }\n      b.setNumDirectives(expectedNumDirectives);\n      b.build().writeDelimitedTo(out);\n      long actualNumPools = 0;\n      while (actualNumPools < expectedNumPools) {\n        try {\n          expectTag(CACHE_MANAGER_SECTION_POOL, false);\n        } catch (IOException e) {\n          throw new IOException(\"Only read \" + actualNumPools +\n              \" cache pools out of \" + expectedNumPools, e);\n        }\n        actualNumPools++;","sourceCodeStart":1067,"sourceCodeEnd":1103,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L1067-L1103","documentation":"Error \"CacheManager section had no <numPools>\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when the CacheManager section header lacks the <numPools> element.","commonSituations":"See trigger scenarios.","solutions":["Add the missing <numPools> element to the CacheManager section of the fsimage XML.","Regenerate the fsimage XML with 'hdfs oiv' from a valid fsimage."],"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-23T01:17:44.959Z"}