{"record":{"id":"f8db7cd6833065ea","repo":"apache/hadoop","slug":"only-read-actualnumpools-cache-pools-out-of-e","errorCode":null,"errorMessage":"Only read ${actualNumPools} cache pools out of ${expectedNumPools}","messagePattern":"Only read (.+?) cache pools out of (.+?)","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":1100,"sourceCode":"      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++;\n        Node pool = new Node();\n        loadNodeChildren(pool, \"pool fields\", \"\");\n        processPoolXml(node);\n      }\n      long actualNumDirectives = 0;\n      while (actualNumDirectives < expectedNumDirectives) {\n        try {\n          expectTag(CACHE_MANAGER_SECTION_DIRECTIVE, false);\n        } catch (IOException e) {\n          throw new IOException(\"Only read \" + actualNumDirectives +\n              \" cache pools out of \" + expectedNumDirectives, e);\n        }\n        actualNumDirectives++;\n        Node pool = new Node();\n        loadNodeChildren(pool, \"directive fields\", \"\");","sourceCodeStart":1082,"sourceCodeEnd":1118,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L1082-L1118","documentation":"Error \"Only read ${actualNumPools} cache pools out of ${expectedNumPools}\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when fewer cache pool stanzas are present than the count declared by <numPools>, indicating truncated or corrupt fsimage XML.","commonSituations":"See trigger scenarios.","solutions":["The XML is truncated or its <numPools> count is wrong; correct the count or add the missing <pool> stanzas.","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-22T20:17:22.307Z"}