Service and decommissioning of hadoop- data nodes
Decommissioning and service of nodes
1. Configure the core-site.xml and yarn-site.xml of the new node, pointing to the name node
Core-site.xml
Fs.defaultFS
Hdfs://s201/
Yarn-site.xml
Yarn.resourcemanager.hostname
S201
2. Configure hdfs-site.xml and yarn-site.xml to specify service / retirement files, which generally point to the same file.
Hdfs-site.xml
Dfs.hosts
/ soft/hadoop/etc/hadoop/include
Dfs.hosts.exclude
/ soft/hadoop/etc/hadoop/exclude
Yarn-site.xml
Yarn.resourcemanager.nodes.include-path
/ soft/hadoop/etc/hadoop/include
Yarn.resourcemanager.nodes.exclude-path
/ soft/hadoop/etc/hadoop/exclude
Create an include/exclude file and edit the list of service / decommissioned hosts
4. Refresh node information
Hdfs dfsadmin-refreshNodes
Yarn rmadmin-refreshNodes
5. Start the new node / close the old node
6. You can update the slaves file manually.