Scaling Namespaces and Optimizing Data Storage
Also available as:
PDF
loading table of contents...

Decommission a DataNode from a federation

To decommission a DataNode from a federation, you must add the node to the exclude file and distribute the updated exclude file among all the NameNodes. Each NameNode decommissions its block pool. When all the NameNodes finish decommissioning a DataNode, the DataNode is considered decommissioned.

  1. In the exclude file, specify the DataNode to decommission.
    If you want to decommission multiple DataNodes, add the corresponding host names separated by a newline character to the exclude file.
  2. Distribute the updated exclude file among all the NameNodes.
    distribute-exclude.sh <exclude_file>
  3. Refresh all the NameNodes to identify the new exclude file.

    The following command uses HDFS configuration to determine the configured NameNodes in the cluster and refreshes them to identify the new exclude file:

    refresh-namenodes.sh