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

Brahma Reddy Battula commented on HDFS-9375:
--------------------------------------------

Approach looks good.
Below are some comments about the patch.

1. Protocol method name need not be {{setBalancerBandwidthForSpecificNode()}}, 
{{setBalancerBandwidth()}} is enough. Since its called on a 
ClientDatanodeProtocol, which is for a specific datanode itself.

2. In DFSadmin usage {{-setBalancerBandwidth <bandwidth in bytes per second> 
<datanode_host1,...>}}, {{<datanode_host1,...>}} should be in rectangular 
braces [], since that is optional. And it should be combination of host and ipc 
port, similar to getBalancerBandwidth command usage. Like below,
{{-setBalancerBandwidth <bandwidth in bytes per second>}} {{[ 
datanode1_host:ipc_port,datanode2_host:ipc_port,.. ]}}

3. {{if <datanode_host1:ipc_port,...> param is null}} instead of this, can 
change to {{if [ datanode_host1:ipc_port,... ] param is not specified}}

4. {{+      System.err.println("Set bandwidth " + bandwidth + "for node " + 
hostName);}} should add space after 'bandwidth +' and should be written to 
System.out, not to System.err

5. {{TestBalancerBandwidth#testBalancerBandwidthForSpecificNode()}}, is not 
actually using the ClientDatanodeProtocol to set the value, 
{{datanodes.get(0).setBalancerBandwidthForSpecificNode(newBandwidth);}} 
directly calls on instance of {{DataNode}}, not via ClientDatanodeProtocol. 
Verification for this also done on the Same instance, for this no waiting 
required.

6. No Test added to verify the DFSAdmin changes. i.e. setting bandwidth for one 
datanode by DFSAdmin command.

7. Document also can be updated to reflect the DFSAdmin command changes.

> Set balancer bandwidth for specific node
> ----------------------------------------
>
>                 Key: HDFS-9375
>                 URL: https://issues.apache.org/jira/browse/HDFS-9375
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: balancer & mover
>    Affects Versions: 2.7.1
>            Reporter: Lin Yiqun
>            Assignee: Lin Yiqun
>         Attachments: HDFS-9375.001.patch, HDFS-9375.002.patch
>
>
> Now even though the balancer is impove a lot, but In some cases that is still 
> slow. For example when the cluster is extended,the new nodes all need 
> balancer datas from existed nodes.In order to improve the balancer 
> velocity,generally,we will use {{setBalancerBandwidth}} of {{dfsadmin}} 
> command.But this is set for every node, obviously,we can increase more 
> bandwidth for new nodes because these nodes lacking of data.When the new 
> nodes balancer data enough,we can let new nodes to work.So we can define a 
> new clientDatanode interface to set specific node's bandwidth.



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

Reply via email to