{"record":{"id":"61958d322f37dedd","repo":"apache/hadoop","slug":"block-replication-0x-08x-doesn-t-fit-in-16-bits","errorCode":null,"errorMessage":"Block replication 0x%08x doesn't fit in 16 bits.","messagePattern":"Block replication 0x%08x doesn't fit in 16 bits\\.","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java","lineNumber":83,"sourceCode":"      blocksize = 0;\n      length = 0;\n      blockReplication = 0;\n      break;\n    case FT_SYMLINK:\n      isdir = false;\n      symlink = new Path(proto.getSymlink());\n      blocksize = 0;\n      length = 0;\n      blockReplication = 0;\n      break;\n    case FT_FILE:\n      isdir = false;\n      symlink = null;\n      blocksize = proto.getBlockSize();\n      length = proto.getLength();\n      int brep = proto.getBlockReplication();\n      if ((brep & 0xffff0000) != 0) {\n        throw new IOException(String.format(\"Block replication 0x%08x \" +\n            \"doesn't fit in 16 bits.\", brep));\n      }\n      blockReplication = (short)brep;\n      break;\n    default:\n      throw new IllegalStateException(\"Unknown type: \" + proto.getFileType());\n    }\n    path = new Path(proto.getPath());\n    mtime = proto.getModificationTime();\n    atime = proto.getAccessTime();\n    permission = convert(proto.getPermission());\n    owner = StringInterner.weakIntern(proto.getOwner());\n    group = StringInterner.weakIntern(proto.getGroup());\n    int flags = proto.getFlags();\n    FileStatus fileStatus = new FileStatus(length, isdir, blockReplication,\n        blocksize, mtime, atime, permission, owner, group, symlink, path,\n        FileStatus.attributes(\n          (flags & FileStatusProto.Flags.HAS_ACL_VALUE) != 0,","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java#L65-L101","documentation":"Error \"Block replication 0x%08x doesn't fit in 16 bits.\" thrown in apache/hadoop.","triggerScenarios":"Thrown in PBHelper.convert(BlockType) when a block replication factor encoded in the block type long exceeds 16 bits and cannot be represented.","commonSituations":"See trigger scenarios.","solutions":["Use a block replication value that fits in 16 bits (0-65535).","Check the replication factor configuration; values above 65535 are not encodable."],"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"}