apache/hadoop · error · IOException
Block replication 0x%08x doesn't fit in 16 bits.
Error message
Block replication 0x%08x doesn't fit in 16 bits.
What it means
Error "Block replication 0x%08x doesn't fit in 16 bits." thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/protocolPB/PBHelper.java:83
blocksize = 0;
length = 0;
blockReplication = 0;
break;
case FT_SYMLINK:
isdir = false;
symlink = new Path(proto.getSymlink());
blocksize = 0;
length = 0;
blockReplication = 0;
break;
case FT_FILE:
isdir = false;
symlink = null;
blocksize = proto.getBlockSize();
length = proto.getLength();
int brep = proto.getBlockReplication();
if ((brep & 0xffff0000) != 0) {
throw new IOException(String.format("Block replication 0x%08x " +
"doesn't fit in 16 bits.", brep));
}
blockReplication = (short)brep;
break;
default:
throw new IllegalStateException("Unknown type: " + proto.getFileType());
}
path = new Path(proto.getPath());
mtime = proto.getModificationTime();
atime = proto.getAccessTime();
permission = convert(proto.getPermission());
owner = StringInterner.weakIntern(proto.getOwner());
group = StringInterner.weakIntern(proto.getGroup());
int flags = proto.getFlags();
FileStatus fileStatus = new FileStatus(length, isdir, blockReplication,
blocksize, mtime, atime, permission, owner, group, symlink, path,
FileStatus.attributes(
(flags & FileStatusProto.Flags.HAS_ACL_VALUE) != 0,View on GitHub (pinned to 2add963021)
Solutions
- Use a block replication value that fits in 16 bits (0-65535).
- Check the replication factor configuration; values above 65535 are not encodable.
When it happens
Trigger: Thrown in PBHelper.convert(BlockType) when a block replication factor encoded in the block type long exceeds 16 bits and cannot be represented.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/61958d322f37dedd.
Report an issue: GitHub.