Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-15-2016 03:57 PM
Hi, all.
I use CDH 5.7 and cloudera manager for cluster operaitions.
I'd like to use balancer option "setBalancerBandwidth" for HDFS balancing, but I read admin_hdfs_balancer.html and found "If you use Cloudera Manager, do not use these command-line instructions".
How can I use balancer option "setBalancerBandwidth" with cloudera manager ?
Or, above comments("If you use...") is not valid for "dfsadmin -setBalancerBandwidth" ?
I know that "dfs.datanode.balance.bandwidthPerSec" option is set bandwith for hdfs balancer, but I would rather not use this option because of need to reboot namenodes.
Created 11-23-2016 08:15 AM
Hi,
It you set the balancer bandwidth in Cloudera manager, then when the datanodes are started, they will have that bandwidth seting for balancing operations. However, using the command line it is possible to change the bandwidth while the datanodes or balancer is running, without restarting them. If you do this, you just need to remember that if you restart any datanodes, the bandwidth setting will revert back to that set in Cloudera Manager and you will need to run the command again.
To set the balancer bandwidth from the command line and without a restart you can run the following:
sudo -u hdfs hdfs dfsadmin -setBalancerBandwidth 104857600
If you have HA setup for HDFS, the above command may fail, and you should check which is the active namenode and run the command like follows (substituting the correct hostname for activeNamenode below):
sudo -u hdfs hdfs dfsadmin -fs hdfs://activeNamenode:8020/ -setBalancerBandwidth 104857600
To check this command worked, the following log entries should appear within the Datanode log files:
INFO org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeCommand action: DNA_BALANCERBANDWIDTHUPDATE
INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Updating balance throttler bandwidth from 10485760 bytes/s to: 104857600 bytes/s.
Created 11-23-2016 08:15 AM
Hi,
It you set the balancer bandwidth in Cloudera manager, then when the datanodes are started, they will have that bandwidth seting for balancing operations. However, using the command line it is possible to change the bandwidth while the datanodes or balancer is running, without restarting them. If you do this, you just need to remember that if you restart any datanodes, the bandwidth setting will revert back to that set in Cloudera Manager and you will need to run the command again.
To set the balancer bandwidth from the command line and without a restart you can run the following:
sudo -u hdfs hdfs dfsadmin -setBalancerBandwidth 104857600
If you have HA setup for HDFS, the above command may fail, and you should check which is the active namenode and run the command like follows (substituting the correct hostname for activeNamenode below):
sudo -u hdfs hdfs dfsadmin -fs hdfs://activeNamenode:8020/ -setBalancerBandwidth 104857600
To check this command worked, the following log entries should appear within the Datanode log files:
INFO org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeCommand action: DNA_BALANCERBANDWIDTHUPDATE
INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Updating balance throttler bandwidth from 10485760 bytes/s to: 104857600 bytes/s.