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

Uma Maheswara Rao G commented on HDFS-2112:
-------------------------------------------

Hi Nicholas,

    Thanks a lot for taking a look on the patch.
    I have indorporated your comments in this patch, please have a look.

    {quote}
     For replthread,
          o Please remove public from replthread. You may add a 
getReplicationThread() method in BlockManagerTestUtil for the tests.
          o Set it to final.
          o Rename it to replicationthread.
          o Change the comment to javadoc.
            i.e. declare it as following.

            /** Replication thread. */
              public final Daemon replicationthread = new Daemon(new 
ReplicationMonitor());
    {quote}
       declared replication moniter thread as 
       /** Replication thread. */
       final Daemon replicationthread = new Daemon(new ReplicationMonitor());
       Also created the getReplicationThread method in BlockManagerTestUtil. 
So, that tests could access the replicationthread through BlockManagerTestUtil.
       I changed replicationthread as replicationThread :-) 

    {quote}
    For the similar reason, let's keep corruptReplicas package private and 
remove getCorruptReplicas().
    {quote}
       Added getCorruptReplicas() in BlockManagerTestUtil.
     Reason why i keep that as private is, I observed some places in code we 
used google's VisibleForTesting annotation tag. So, i thought to put that for 
accessing in tests.
     Now made it to deafult scope.

    {quote}
     Similarly, remove public from computeDatanodeWork and add a getter in 
BlockManagerTestUtil.
    {quote}
      changed it to deafult scope.

    {quote}
     Let's set replicationRecheckInterval to final
    {quote}
     fixed
    

    {quote}
     Add private to ReplicationMonitor class and @Override to run().
    {quote}
     fixed

    {quote}
     Remove namesystem.getBlockManager() since we are already inside 
BlockManager.

      //ReplicationMonitor.run().
      +          namesystem.getBlockManager().processPendingReplications();

     {quote}
     yes fixed. i missed it :(....oversight

    {quote}
      Remove the following comments since it is no longer valid.

      /////////////////////////////////////////////////////////
        //
        // These methods are called by the Namenode system, to see
        // if there is any work for registered datanodes.
        //
        /////////////
     {quote}
     cleaned the comments which are unnecessary now.


     I will take care of such comments in future. - Thanks

> Move ReplicationMonitor to block management
> -------------------------------------------
>
>                 Key: HDFS-2112
>                 URL: https://issues.apache.org/jira/browse/HDFS-2112
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Uma Maheswara Rao G
>         Attachments: HDFS-2112.1.patch, HDFS-2112.patch
>
>
> Replication should be handled by block manager instead of name system. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to