Hadoop Add and Remove nodes
A Adding nodes
(a) There are two ways to add a node, one is static add, close the Hadoop cluster, configure the appropriate configuration, restart the cluster (this will not be restated)
(b) Dynamically added, adding nodes without restarting the cluster
1. Set up new Datanode and namenode SSH login without password
2. Add the host name to the hosts and copy the file to the other nodes in the cluster.
3. Modify the slaves file on the Namenode node (used primarily for the next reboot)
4. To start a process in Datanode:
sbin/hadoop-daemon.sh Start Datanode
sbin/yarn-daemon.sh Start NodeManager
5. Starting in Datanode: start-balancer.sh balancing the current HDFs block
Two Delete a node
1. Need to be configured in the Hdfs-site.xml configuration file:
<property>
<name>dfs.hosts.exclude</name>
<value>/usr/local/cluster/hadoop-2.2.0/etc/hadoop/exclude</value>
</property>
In the Hadoop 2.2.0 documentation, it was said that by configuring Dfs.namenode.hosts.exclude, there was no effect, and dfs.hosts.exclude with earlier versions of the configuration items
2. In the exclude file, add the node you want to delete.
Then execute the Refresh command: HDFs dfsadmin-refreshnodes
The status of this node can be viewed according to the HDFs Dfsadmin-report
Three Add HBase Node
Add the host of the new node in the Hmaster regionserver configuration file
Start hregionserver with the following command in the new node:
hbase-daemon.sh Start Regionserver
Can be confirmed by hbase shell and status
Four. Delete HBase nodes
hbase-daemon.sh Stop Regionserver
Stop load Balancer before the downline node
To go offline a regionserver can do this, when executing the graceful_stop script, turn off the region Load balancer (otherwise balancer and downline scripts will conflict over the region deployment issue)
Graceful_stop.sh HOSTNAME