{"record":{"id":"73515870689a2e04","repo":"apache/hadoop","slug":"cache-directive-expiration-found-without-millis","errorCode":null,"errorMessage":"cache directive <expiration> found without <millis>","messagePattern":"cache directive <expiration> found without <millis>","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":1196,"sourceCode":"      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 =\n            expiration.removeChildLong(CACHE_MANAGER_SECTION_MILLIS);\n        if (millis == null) {\n          throw new IOException(\"cache directive <expiration> found \" +\n              \"without <millis>\");\n        }\n        ebld.setMillis(millis);\n        if (expiration.removeChildBool(CACHE_MANAGER_SECTION_RELATIVE)) {\n          ebld.setIsRelative(true);\n        } else {\n          ebld.setIsRelative(false);\n        }\n        bld.setExpiration(ebld);\n      }\n      directive.verifyNoRemainingKeys(\"directive\");\n      bld.build().writeDelimitedTo(out);\n    }\n  }\n\n  private class INodeReferenceSectionProcessor implements SectionProcessor {\n    static final String NAME = \"INodeReferenceSection\";\n","sourceCodeStart":1178,"sourceCodeEnd":1214,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L1178-L1214","documentation":"Error \"cache directive <expiration> found without <millis>\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when a cache directive <expiration> stanza lacks the mandatory <millis> element.","commonSituations":"See trigger scenarios.","solutions":["Add the missing <millis> element inside the cache directive <expiration> 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-23T01:17:44.959Z"}