apache/hadoop · error · IOException
Only read ${actualNumPools} cache pools out of ${expectedNum
Error message
Only read ${actualNumPools} cache pools out of ${expectedNumPools} What it means
Error "Only read ${actualNumPools} cache pools out of ${expectedNumPools}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java:1100
Integer expectedNumPools =
node.removeChildInt(CACHE_MANAGER_SECTION_NUM_POOLS);
if (expectedNumPools == null) {
throw new IOException("CacheManager section had no <numPools>");
}
b.setNumPools(expectedNumPools);
Integer expectedNumDirectives =
node.removeChildInt(CACHE_MANAGER_SECTION_NUM_DIRECTIVES);
if (expectedNumDirectives == null) {
throw new IOException("CacheManager section had no <numDirectives>");
}
b.setNumDirectives(expectedNumDirectives);
b.build().writeDelimitedTo(out);
long actualNumPools = 0;
while (actualNumPools < expectedNumPools) {
try {
expectTag(CACHE_MANAGER_SECTION_POOL, false);
} catch (IOException e) {
throw new IOException("Only read " + actualNumPools +
" cache pools out of " + expectedNumPools, e);
}
actualNumPools++;
Node pool = new Node();
loadNodeChildren(pool, "pool fields", "");
processPoolXml(node);
}
long actualNumDirectives = 0;
while (actualNumDirectives < expectedNumDirectives) {
try {
expectTag(CACHE_MANAGER_SECTION_DIRECTIVE, false);
} catch (IOException e) {
throw new IOException("Only read " + actualNumDirectives +
" cache pools out of " + expectedNumDirectives, e);
}
actualNumDirectives++;
Node pool = new Node();
loadNodeChildren(pool, "directive fields", "");View on GitHub (pinned to 2add963021)
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.
When it happens
Trigger: Thrown by oiv -r when fewer cache pool stanzas are present than the count declared by <numPools>, indicating truncated or corrupt fsimage XML.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/f8db7cd6833065ea.
Report an issue: GitHub.