Hadoop,hbase Adding and removing nodes

Source: Internet
Author: User

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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.