[
https://issues.apache.org/jira/browse/HDFS-9754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132403#comment-15132403
]
Tsz Wo Nicholas Sze commented on HDFS-9754:
-------------------------------------------
Condition A and Condition B are different. Could you explain why Condition B
can replace Condition A?
- Condition A: {{bc.isUnderConstruction() && block.equals(bc.getLastBlock())}}
//last block of an under construction file; it could be in COMMITTED or
COMPLETE state
- Condition B: {{!block.isCompleteOrCommitted()}} //neither COMMITTED nor
COMPLETE; it may not be the last block.
> Avoid unnecessary getBlockCollection calls in BlockManager
> ----------------------------------------------------------
>
> Key: HDFS-9754
> URL: https://issues.apache.org/jira/browse/HDFS-9754
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Reporter: Jing Zhao
> Assignee: Jing Zhao
> Attachments: HDFS-9754.000.patch
>
>
> Currently BlockManager calls {{Namesystem#getBlockCollection}} in order to:
> 1. check if the block has already been abandoned
> 2. identify the storage policy of the block
> 3. meta save
> For #1 we can use BlockInfo's internal state instead of checking if the
> corresponding file still exists.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)