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:
For illustration purpose, we assume to decommission DataNode on host
slave1 from our running Hadoop cluster.
Perform the following steps to decommission a live DataNode:
$HADOOP_HOME/conf/dfs-exclude.txtwith the following content: