Hadoop – Decommission datanode


Decommissioning is process to remove one or multiple datanodes from Hadoop.

To decommission a datanode you need to use following process:

Login to namenode host.

Add follwoing configuration in/home/guest/hadoop-2.5.1/etc/hadoop/hdfs-site.xml


After adding dfs.hosts.exclude property you need to restart HDFS.

Then add datanode hostname that you want to remove in /home/guest/hadoop-2.5.1/etc/hadoop/decommission-nodes

Now run follwoing command to start decommissioning datanode

$ hadoop-2.5.1/bin/hdfs dfsadmin -refreshNodes

This process will run for few minutes depending on data size in datanode, keep monitor decommissioning status in on http://namenode:50070

After finishing decommissioning you can remove that datanode.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s