{"record":{"id":"3b7a9255babec553","repo":"apache/hadoop","slug":"directive-found-without-id","errorCode":null,"errorMessage":"<directive> found without <id>","messagePattern":"<directive> found without <id>","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":1170,"sourceCode":"        throw new IOException(\"<pool> found without <limit>\");\n      }\n      bld.setLimit(limit);\n      Long maxRelativeExpiry =\n          pool.removeChildLong(CACHE_MANAGER_SECTION_MAX_RELATIVE_EXPIRY);\n      if (maxRelativeExpiry == null) {\n        throw new IOException(\"<pool> found without <maxRelativeExpiry>\");\n      }\n      bld.setMaxRelativeExpiry(maxRelativeExpiry);\n      pool.verifyNoRemainingKeys(\"pool\");\n      bld.build().writeDelimitedTo(out);\n    }\n\n    private void processDirectiveXml(Node directive) throws IOException {\n      CacheDirectiveInfoProto.Builder bld =\n          CacheDirectiveInfoProto.newBuilder();\n      Long id = directive.removeChildLong(SECTION_ID);\n      if (id == null) {\n        throw new IOException(\"<directive> found without <id>\");\n      }\n      bld.setId(id);\n      String path = directive.removeChildStr(SECTION_PATH);\n      if (path == null) {\n        throw new IOException(\"<directive> found without <path>\");\n      }\n      bld.setPath(path);\n      Integer replication = directive.removeChildInt(SECTION_REPLICATION);\n      if (replication == null) {\n        throw new IOException(\"<directive> found without <replication>\");\n      }\n      bld.setReplication(replication);\n      String pool = directive.removeChildStr(CACHE_MANAGER_SECTION_POOL);\n      if (path == null) {\n        throw new IOException(\"<directive> found without <pool>\");\n      }\n      bld.setPool(pool);\n      Node expiration =","sourceCodeStart":1152,"sourceCodeEnd":1188,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L1152-L1188","documentation":"Error \"<directive> found without <id>\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when a <directive> stanza in the CacheManager section lacks the mandatory <id> element.","commonSituations":"See trigger scenarios.","solutions":["Add the missing <id> element to the <directive> stanza in 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-22T20:17:22.307Z"}