{"record":{"id":"bd260578589e3b3f","repo":"apache/hadoop","slug":"directive-found-without-path","errorCode":null,"errorMessage":"<directive> found without <path>","messagePattern":"<directive> found without <path>","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":1175,"sourceCode":"      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 =\n          directive.removeChild(CACHE_MANAGER_SECTION_EXPIRATION);\n      if (expiration != null) {\n        CacheDirectiveInfoExpirationProto.Builder ebld =\n            CacheDirectiveInfoExpirationProto.newBuilder();\n        Long millis =","sourceCodeStart":1157,"sourceCodeEnd":1193,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L1157-L1193","documentation":"Error \"<directive> found without <path>\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when a <directive> stanza lacks the mandatory <path> element.","commonSituations":"See trigger scenarios.","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."],"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"}