{"record":{"id":"e3b65661ea254f15","repo":"apache/hadoop","slug":"block-found-without-genstamp","errorCode":null,"errorMessage":"<block> found without <genstamp>","messagePattern":"<block> found without <genstamp>","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":752,"sourceCode":"        throw new IOException(\"INode XML found with unknown <blocktype> \" +\n            blockType);\n      }\n    }\n    return bld;\n  }\n\n  private HdfsProtos.BlockProto.Builder createBlockBuilder(Node block)\n      throws IOException {\n    HdfsProtos.BlockProto.Builder blockBld =\n        HdfsProtos.BlockProto.newBuilder();\n    Long id = block.removeChildLong(SECTION_ID);\n    if (id == null) {\n      throw new IOException(\"<block> found without <id>\");\n    }\n    blockBld.setBlockId(id);\n    Long genstamp = block.removeChildLong(INODE_SECTION_GENSTAMP);\n    if (genstamp == null) {\n      throw new IOException(\"<block> found without <genstamp>\");\n    }\n    blockBld.setGenStamp(genstamp);\n    Long numBytes = block.removeChildLong(INODE_SECTION_NUM_BYTES);\n    if (numBytes == null) {\n      throw new IOException(\"<block> found without <numBytes>\");\n    }\n    blockBld.setNumBytes(numBytes);\n    return blockBld;\n  }\n\n  private void processDirectoryXml(Node node,\n          INodeSection.INode.Builder inodeBld) throws IOException {\n    inodeBld.setType(INodeSection.INode.Type.DIRECTORY);\n    INodeSection.INodeDirectory.Builder bld =\n        createINodeDirectoryBuilder(node);\n    inodeBld.setDirectory(bld);\n    // Will check remaining keys and serialize in processINodeXml\n  }","sourceCodeStart":734,"sourceCodeEnd":770,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L734-L770","documentation":"Error \"<block> found without <genstamp>\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when a <block> stanza in the fsimage XML is missing its mandatory <genstamp> element.","commonSituations":"See trigger scenarios.","solutions":["Add the missing <genstamp> element to the <block> 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"}