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

Konstantin Shvachko commented on HDFS-8984:
-------------------------------------------

Some comments on the latest patch review:
# No need to import {{BlockManager}} in NameNode.java
# Do we need to check {{blockManager}} is null in calls like 
{{blockManager.shouldPopulateReplQueues()}}? If we do you can use the original 
methods in {{FSNamesystem}} as delegates to BlockManager with the null check.
# {{BlockManager.haContext}} is not nedeed. You can just add {{HAContext 
haContext = namesystem.getHAContext();}} as a local variable in 
{{shouldPopulateReplQueues()}}.
# White space only changes in {{ActiveState}}.
# {{TestSeveralNameNodes}} changes do not seem to be related to this issue.
# Tests {{TestReplicationPolicy}} and {{TestFSNamesystem}} are failing on my 
box after the patch. May be because you removed mocking for 
{{isPopulatingReplQueues()}} and/or {{shouldPopulateReplQueues()}}. I am not 
sure as I did not debug them.

> Move replication queues related methods in FSNamesystem to BlockManager
> -----------------------------------------------------------------------
>
>                 Key: HDFS-8984
>                 URL: https://issues.apache.org/jira/browse/HDFS-8984
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-8984.000.patch, HDFS-8984.001.patch, 
> HDFS-8984.002.patch, HDFS-8984.003.patch
>
>
> Currently {{FSNamesystem}} controls whether replication queue should be 
> populated based on whether the NN is in safe mode or whether it is an active 
> NN.
> Replication is a concept on the block management layer. It is more natural to 
> place the functionality in the {{BlockManager}} class.
> This jira proposes to move the these methods to the {{BlockManager}}.



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

Reply via email to