4. Decommission NodeManagers

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]Note

    If no yarn.include file is specified, all NodeManagers are considered to be included in the cluster (unless excluded in the yarn.exclude file). The yarn.resourcemanager.nodes.include-path and yarn.resourcemanager.nodes.exclude-path properties in yarn-site.xml are used to specify the yarn.include and yarn.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.