Description
Found more redundant searches in BlockManager.addStoredBLock() and BlockManager.getNodes(Block).
The pattern here is that we first call BlocksMap.numNodes(Block) in order to determine the size of the array of data-nodes. This is one search in blocksMap. Then we call BlocksMap.nodeIterator(Block), which also performs a search. This is all not necessary because we already have the block in the form of BlockInfo from blocksMap and do not need to search for it.
Attachments
Attachments
Issue Links
- blocks
-
HDFS-517 Introduce BlockInfoUnderConstruction to reflect block replica states while writing.
- Resolved