Details
Description
HDFS-4645 has changed HDFS block ID from randomly generated to sequential positive IDs. And later on, HDFS EC was built on the assumption that normal 3x replica block IDs are positive, so EC re-use negative IDs as striped blocks.
However, there are legacy block IDs can be negative in the system, we should not use hardcode method to check whether a block is stripe or not:
public static boolean isStripedBlockID(long id) { return BlockType.fromBlockId(id) == STRIPED; }
Attachments
Attachments
Issue Links
- is related to
-
HDFS-10867 [PROVIDED Phase 2] Block Bit Field Allocation of Provided Storage
- Resolved