apache/hadoop · error · IOException
<directive> found without <path>
Error message
<directive> found without <path>
What it means
Error "<directive> found without <path>" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java:1175
if (maxRelativeExpiry == null) {
throw new IOException("<pool> found without <maxRelativeExpiry>");
}
bld.setMaxRelativeExpiry(maxRelativeExpiry);
pool.verifyNoRemainingKeys("pool");
bld.build().writeDelimitedTo(out);
}
private void processDirectiveXml(Node directive) throws IOException {
CacheDirectiveInfoProto.Builder bld =
CacheDirectiveInfoProto.newBuilder();
Long id = directive.removeChildLong(SECTION_ID);
if (id == null) {
throw new IOException("<directive> found without <id>");
}
bld.setId(id);
String path = directive.removeChildStr(SECTION_PATH);
if (path == null) {
throw new IOException("<directive> found without <path>");
}
bld.setPath(path);
Integer replication = directive.removeChildInt(SECTION_REPLICATION);
if (replication == null) {
throw new IOException("<directive> found without <replication>");
}
bld.setReplication(replication);
String pool = directive.removeChildStr(CACHE_MANAGER_SECTION_POOL);
if (path == null) {
throw new IOException("<directive> found without <pool>");
}
bld.setPool(pool);
Node expiration =
directive.removeChild(CACHE_MANAGER_SECTION_EXPIRATION);
if (expiration != null) {
CacheDirectiveInfoExpirationProto.Builder ebld =
CacheDirectiveInfoExpirationProto.newBuilder();
Long millis =View on GitHub (pinned to 2add963021)
Solutions
- Add the missing <path> element to the <directive> stanza in the fsimage XML.
- Regenerate the fsimage XML with 'hdfs oiv' from a valid fsimage.
When it happens
Trigger: Thrown by oiv -r when a <directive> stanza lacks the mandatory <path> element.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/bd260578589e3b3f.
Report an issue: GitHub.