Use the following instructions to decommission NodeManagers in your cluster:
On the NameNode host machine, edit the
<HADOOP_CONF_DIR>/yarn.excludefile and add the list of NodeManager hostnames (separated by a newline character).where
<HADOOP_CONF_DIR>is the directory for storing the Hadoop configuration files. For example,/etc/hadoop/conf.If your cluster utilizes a
yarn.includefile, remove the decommissioned nodes from the<HADOOP_CONF_DIR>/yarn.includefile on the ResourceManager host machine.![[Note]](../common/images/admon/note.png)
Note If no
yarn.includefile is specified, all NodeManagers are considered to be included in the cluster (unless excluded in theyarn.excludefile).The yarn.resourcemanager.nodes.include-pathandyarn.resourcemanager.nodes.exclude-pathproperties inyarn-site.xmlare used to specify theyarn.includeandyarn.excludefiles.Update the ResourceManager with the new set of NodeManagers. On the ResourceManager host machine, execute the following command:
su <YARN_USER> yarn rmadmin -refreshNodes
where
<YARN_USER>is the user who owns the YARN services, for example,yarn.

