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

Junping Du commented on HDFS-5222:
----------------------------------

Thanks Nicholas for addressing these comments. The new patch looks good to me 
except a tiny bug in original code that you are moving: 
{code}
+  /** Adjusts curr and prev number of blocks scheduled every few minutes. */
+  private void rollBlocksScheduled(long now) {
+    if (now - lastBlocksScheduledRollTime > BLOCKS_SCHEDULED_ROLL_INTERVAL) {
+      prevApproxBlocksScheduled = currApproxBlocksScheduled;
+      currApproxBlocksScheduled = 0;
+      lastBlocksScheduledRollTime = now;
+    }
+  }
{code}
It should be "prevApproxBlocksScheduled += currApproxBlocksScheduled;". Isn't 
it? 
+1 once this comments are addressed. :)
                
> Move block schedule information from DatanodeDescriptor to DatanodeStorageInfo
> ------------------------------------------------------------------------------
>
>                 Key: HDFS-5222
>                 URL: https://issues.apache.org/jira/browse/HDFS-5222
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h5222_20130819.patch, h5222_20130824.patch
>
>
> In HDFS-4990, the block placement target type was changed from 
> DatanodeDescriptor to DatanodeStorageInfo.  The block schedule information, 
> such as the number of blocks scheduled for replication (i.e. 
> getBlocksScheduled()), should be moved from DatanodeDescriptor to 
> DatanodeStorageInfo.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to