You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Hairong Kuang (JIRA)" <ji...@apache.org> on 2009/07/30 08:34:14 UTC
[jira] Commented: (HDFS-511) Redundant block searches in
BlockManager.
[ https://issues.apache.org/jira/browse/HDFS-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12737013#action_12737013 ]
Hairong Kuang commented on HDFS-511:
------------------------------------
> markBlockAsCorrupt() takes BlockInfo instead of Block as a parameter, thus there is no need to search for the block in the BlocksMap.
I would prefer to keep BlockManager#markBlockAsCorrupt(Block, ...) to make BlockManager APIs consistently to take Block as a parameter. But to have a private method BlockManager#markBlockAsCorrupt(BlockInfo...) to avoid redundant lookup.
> Redundant block searches in BlockManager.
> -----------------------------------------
>
> Key: HDFS-511
> URL: https://issues.apache.org/jira/browse/HDFS-511
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.21.0
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.21.0
>
> Attachments: BlockManager.patch, BlockManager.patch
>
>
> Some searches for a block in {{blocksMap}} are redundant and should be eliminated.
> {{BlockManager.addStoredBlock()}} contain unnecessary explicit and hidden (inside {{markBlockAsCorrupt()}}) calls of {{blocksMap.getStoredBlock()}}.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.