Similar to TaskTracker, there are situations when we need to temporarily disable a DataNode from the cluster, for example, because the storage space of the DataNode has been used up. In this recipe, we will outline steps to decommission a DataNode from a live Hadoop cluster.
We assume that our Hadoop has been configured properly.
Log in to the master node from the cluster administrator machine with the following command:
ssh hduser@master
Perform the following steps to decommission a live DataNode:
Create the file
$HADOOP_HOME/conf/dfs-exclude.txt
with the following content:slave1
Add the following property to the file
$HADOOP_HOME/conf/hdfs-site.xml
:<property> <name>dfs.hosts.exclude</name>...