{"record":{"id":"1524de2ec5172ba7","repo":"apache/hadoop","slug":"unknown-inode-type-numblocks","errorCode":null,"errorMessage":"Unknown inode type: numBlocks={}","messagePattern":"Unknown inode type: numBlocks=(.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java","lineNumber":879,"sourceCode":"      \n      final boolean isWithName = in.readBoolean();\n      // lastSnapshotId for WithName node, dstSnapshotId for DstReference node\n      int snapshotId = in.readInt();\n      \n      final INodeReference.WithCount withCount\n          = referenceMap.loadINodeReferenceWithCount(isSnapshotINode, in, this);\n\n      if (isWithName) {\n          return new INodeReference.WithName(null, withCount, localName,\n              snapshotId);\n      } else {\n        final INodeReference ref = new INodeReference.DstReference(null,\n            withCount, snapshotId);\n        return ref;\n      }\n    }\n    \n    throw new IOException(\"Unknown inode type: numBlocks=\" + numBlocks);\n  }\n\n    /** Load {@link INodeFileAttributes}. */\n    public INodeFileAttributes loadINodeFileAttributes(DataInput in)\n        throws IOException {\n      final int layoutVersion = getLayoutVersion();\n      \n      if (!NameNodeLayoutVersion.supports(\n          LayoutVersion.Feature.OPTIMIZE_SNAPSHOT_INODES, layoutVersion)) {\n        return loadINodeWithLocalName(true, in, false).asFile();\n      }\n  \n      final byte[] name = FSImageSerialization.readLocalName(in);\n      final PermissionStatus permissions = PermissionStatus.read(in);\n      final long modificationTime = in.readLong();\n      final long accessTime = in.readLong();\n  \n      final short replication = namesystem.getBlockManager().adjustReplication(","sourceCodeStart":861,"sourceCodeEnd":897,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java#L861-L897","documentation":"Error \"Unknown inode type: numBlocks={}\" thrown in apache/hadoop.","triggerScenarios":"Loading an old fsimage inode entry whose numBlocks value matches neither a file nor a directory nor a symlink.","commonSituations":"See trigger scenarios.","solutions":["The image contains an unrecognized inode entry; restore from a valid fsimage or investigate image corruption."],"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"}