Use the following instructions to decommission NodeManagers in your cluster:
On the NameNode host machine, edit the
<HADOOP_CONF_DIR>/yarn.exclude
file 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.include
file, remove the decommissioned nodes from the<HADOOP_CONF_DIR>/yarn.include
file on the ResourceManager host machine.Note If no
yarn.include
file is specified, all NodeManagers are considered to be included in the cluster (unless excluded in theyarn.exclude
file).The yarn.resourcemanager.nodes.include-path
andyarn.resourcemanager.nodes.exclude-path
properties inyarn-site.xml
are used to specify theyarn.include
andyarn.exclude
files.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
.