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

Rakesh R commented on HDFS-7116:
--------------------------------

*Initial design thoughts:*

Case-1) Datanode will inform Namenode about the 
{{dfs.datanode.balance.bandwidthPerSec}} configured value through the 
heartbeat. Initially I thought of updating Namenode only once during the 
DatanodeRegistration process, but on a second thought I decided to send it 
through heartbeat for consistency. On receiving the heartbeat, Namenode 
HeartbeatManager will update the bandwidth value in {{DatanodeInfo#bandwidth }} 
field. Then continue to the existing logic of checking a new bandwidth value 
from admin. Here, this check will be like, 
{code}
if ( DatanodeInfo#newBalancerBandwidth > 0 && DatanodeInfo#newBalancerBandwidth 
!= DatanodeInfo#bandwidth )
{code}
then sent UPDATE_BANDWIDTH command to Datanode.

Case-2) Administrator sends {{-setBalancerBandwidth}} command. Now, this 
information will be keeping in a new field {{newBalancerBandwidth}} in the 
{{DatanodeInfo}} object.

Could you please review the algorithm and appreciate review comments. Thanks!

> Add a command to get the bandwidth of balancer
> ----------------------------------------------
>
>                 Key: HDFS-7116
>                 URL: https://issues.apache.org/jira/browse/HDFS-7116
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: balancer & mover
>            Reporter: Akira AJISAKA
>            Assignee: Rakesh R
>
> Now reading logs is the only way to check how the balancer bandwidth is set. 
> It would be useful for administrators if they can get the parameter via CLI.



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

Reply via email to