O'Reilly logo

Hadoop 2.x Administration Cookbook by Gurmukh Singh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required