官术网_书友最值得收藏!

Control block report storm

When Datanodes come up in large clusters with more than 200 nodes, Namenode will be overwhelmed by the block reports and this can cause Namenode to become unresponsive.

Getting ready

This recipe makes more sense for large clusters, not in terms of the number of nodes, but the number of blocks in the cluster.

How to do it...

  1. ssh to Namenode and edit the hdfs-site.xml file to add the following property to it:
    <property>
    <name>dfs.blockreport.initialDelay</name>
    <value>20</value>
    </property>
  2. Copy hdfs-site.xml across all nodes in the cluster.
  3. Restart HDFS daemons across the nodes for the property to take effect:
    $ stop-dfs.sh
    $ start-dfs.sh
    

How it works...

The dfs.blockreport.initialDelay parameter specifies the time in seconds. This is the upper limit of the allotted time, and it is chosen randomly by all Datanodes. What it means is that a few Datanodes can take the value of 1, others may be 2, and a few others 10, but the maximum values are capped at 20 seconds.

Now, instead of the block report being sent immediately when the Datanodes come up, it will be delayed by the specified number of seconds. This will reduce the block advertisement storm on Namenode.

主站蜘蛛池模板: 西宁市| 宁南县| 永平县| 弋阳县| 金溪县| 万山特区| 藁城市| 双鸭山市| 增城市| 乐平市| 苏尼特左旗| 上思县| 安龙县| 通榆县| 潢川县| 清远市| 嘉定区| 固阳县| 田东县| 分宜县| 厦门市| 格尔木市| 呼伦贝尔市| 广平县| 鱼台县| 乡城县| 遂川县| 江孜县| 江安县| 肥乡县| 马关县| 苏尼特右旗| 渝北区| 绥阳县| 汉川市| 水富县| 平远县| 法库县| 麦盖提县| 兴义市| 穆棱市|