apache/hadoop · error · IOException
CacheManager section had no <nextDirectiveId>
Error message
CacheManager section had no <nextDirectiveId>
What it means
Error "CacheManager section had no <nextDirectiveId>" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java:1079
return date.getTime();
} catch (ParseException e) {
throw new IOException("Failed to parse ISO date string " + dateStr, e);
}
}
}
private class CacheManagerSectionProcessor implements SectionProcessor {
static final String NAME = "CacheManagerSection";
@Override
public void process() throws IOException {
Node node = new Node();
loadNodeChildren(node, "CacheManager fields", "pool", "directive");
CacheManagerSection.Builder b = CacheManagerSection.newBuilder();
Long nextDirectiveId =
node.removeChildLong(CACHE_MANAGER_SECTION_NEXT_DIRECTIVE_ID);
if (nextDirectiveId == null) {
throw new IOException("CacheManager section had no <nextDirectiveId>");
}
b.setNextDirectiveId(nextDirectiveId);
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 {View on GitHub (pinned to 2add963021)
Solutions
- Add the missing <nextDirectiveId> element to the CacheManager section of the fsimage XML.
- Regenerate the fsimage XML with 'hdfs oiv' from a valid fsimage.
When it happens
Trigger: Thrown by oiv -r when the CacheManager section header of the fsimage XML lacks the <nextDirectiveId> element.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/682049e2f80f5b29.
Report an issue: GitHub.