{"record":{"id":"d03e4aeee4600d29","repo":"apache/hadoop","slug":"inode-xml-found-with-unknown-blocktype-blocktyp","errorCode":null,"errorMessage":"INode XML found with unknown <blocktype> {blockType}","messagePattern":"INode XML found with unknown <blocktype> (.+?)","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":734,"sourceCode":"    ival = node.removeChildInt(INODE_SECTION_STORAGE_POLICY_ID);\n    if (ival != null) {\n      bld.setStoragePolicyID(ival);\n    }\n    String blockType = node.removeChildStr(INODE_SECTION_BLOCK_TYPE);\n    if(blockType != null) {\n      switch (blockType) {\n      case \"CONTIGUOUS\":\n        bld.setBlockType(HdfsProtos.BlockTypeProto.CONTIGUOUS);\n        break;\n      case \"STRIPED\":\n        bld.setBlockType(HdfsProtos.BlockTypeProto.STRIPED);\n        ival = node.removeChildInt(INODE_SECTION_EC_POLICY_ID);\n        if (ival != null) {\n          bld.setErasureCodingPolicyID(ival);\n        }\n        break;\n      default:\n        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>\");","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L716-L752","documentation":"Error \"INode XML found with unknown <blocktype> {blockType}\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when a block stanza carries a <blocktype> value that is not a recognized BlockType (e.g. CONTIGUOUS/STRIPED), indicating corrupt or incompatible fsimage XML.","commonSituations":"See trigger scenarios.","solutions":["Use a valid <blocktype> value (e.g. CONTIGUOUS or STRIPED) in the fsimage XML.","Regenerate the fsimage XML with the matching version of 'hdfs oiv' so block types are emitted correctly."],"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"}