Updating the patch to remove redundant logic between BlockInfo and BlockInfoContiguous.
The main difference between BlockInfoStriped and BlockInfoContiguous is that in BIStriped#triplets, the first dataBlockNum slots are ordered based on internal block indices. Therefore the first dataBlockNum slots could have null, and we need an indices array to interpret the slots after dataBlockNum. So only addStorage, removeStorage, and numNodes should stay abstract in BlockInfo and be separately implemented.
Jing Zhao We discussed similar ideas under
HDFS-7285 JIRAs. Let me know if the above makes sense to you.