In the previous post there is a description of dynamically adding a node, this time explains how to dynamically delete a node.
In the previous post there is a tutorial on how to limit the connection of a node, to dynamically delete a node, you can configure on this basis.
1. Configure the Dfs.hosts.exclude on the host1
Add Host4 to the file specified by Dfs.hosts.exclude:
Then execute the following command:
hadoop dfsadmin -refreshNodes
Then use the following command to view:
hadoop dfsadmin -report
As follows:
2. Web interface
As you can see from the Web management interface, there are currently only 3 nodes, and Host4 has no more:
3. Remove Host4 from the slaves file
4. Remove Host4 from dfs.hosts
5. Configure the Mapred.hosts.exclude in Host3
Add Host4 to the file specified by Mapred.hosts.exclude:
Use the following command to refresh:
-refreshNodes
As follows:
6. Remove Host4 from the slaves file
7. Remove Host4 from mapred.hosts
8. View Host4
On the host4 we can still see Tasktracker running:
Use the following command to stop actively:
workspace/hadoop-1.2.1stop tasktracker
As follows:
[Nutch] Hadoop dynamically deletes Datanode nodes and Tasktracker nodes