[ 
https://issues.apache.org/jira/browse/HDFS-7912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14359699#comment-14359699
 ] 

Zhe Zhang commented on HDFS-7912:
---------------------------------

[~jingzhao] Thanks for the feedback on HDFS-7369. Per discussion there, I 
believe it is beneficial to use {{BlockInfo}} in these BM classes.

I read through the patch and it looks good to me overall. My only concern is 
that it adds some {{getStoredBlock}} calls. For example, 
{{BlockManager#addBlock}} calls 
{{pendingReplications.decrement(getStoredBlock(block), node);}}. With millions 
of blocks I guess it will add some overhead. How about changing the signatures 
of {{processAndHandleReportedBlock}} and {{processReportedBlock}} to take the 
{{BlockInfo}} so {{processReportedBlock}} doesn't have to get it again?

Also, do we need {{storedBlock}} in the following code?
{code}
-      NumberReplicas numberReplicas =
-          
namenode.getNamesystem().getBlockManager().countNodes(block.getLocalBlock());
+      final BlockManager blockManager = namenode.getNamesystem()
+          .getBlockManager();
+      final BlockInfo storedBlock = blockManager.getStoredBlock(
+          block.getLocalBlock());
+      NumberReplicas numberReplicas = blockManager.countNodes(storedBlock);
{code}

> Erasure Coding: track BlockInfo instead of Block in UnderReplicatedBlocks and 
> PendingReplicationBlocks
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-7912
>                 URL: https://issues.apache.org/jira/browse/HDFS-7912
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-7912.000.patch
>
>
> Now with striped blocks and the design that uses a single BlockInfoStriped 
> object to track all the corresponding blocks, we need to clearly distinguish 
> the type Block and BlockInfo in BlockManager. Specifically, data structures 
> like {{UnderReplicatedBlocks}} and {{PendingReplicationBlocks}} should track 
> BlockInfo instead of Block in order to support striped block recovery.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to