Configuring Datanode heartbeat

The Datanodes periodically update the Namenode about its presence or any changes in the blocks. The default Datanode heartbeat time is three seconds. But this does not mean that if a Datanode does not send a heartbeat for, say, 10 seconds, that the node will be marked dead.

In this recipe, we will look at how a heartbeat is configured and the parameters that play a role in its function.

Getting ready

You have a running cluster, and the user is familiar with Datanode communication with Namenode.

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.heartbeat.interval</name> <value>3</value> </property> <property> <name>dfs.namenode.heartbeat.recheck-interval</name> ...

Get Hadoop 2.x Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.