Zookeeper cluster installation (HBase cluster is installed)

Source: Internet
Author: User

The HBase cluster is installed, and the HBase cluster can be successfully started by using its own installed zookeeper cluster when the problem with its built-in zookeeper cluster fails to resolve.

1, in the/home/instal directory, decompression zookeeper-3.4.6 to the directory

TAR-ZXVF zookeeper-3.4.6.tar.gz-c/home/instal

2. Copy the zoo_sample.cfg under zookeeper-3.4.6/conf and rename it to Zoo.cfg
CP Zoo_sample.cfg Zoo.cfg

Next, add the following configuration in Zoo.cfg:

server.1=slaves7:2888:3888
server.2=slaves8:2888:3888
server.3=slaves9:2888:3888

Datadir=/home/install/zookeeper-3.4.6-data

Create a new Zookeeper-3.4.6-data, create a new myID file under the folder, edit the myID file, and enter the corresponding number on the corresponding IP machine. such as in Slaves7, myID content is 1, on SLAVES8, myID content is 2, each machine above want a change.

3. Copy the configured zookeeper-3.4.6 and Zookeeper-3.4.6-data to the remaining zookeeper cluster sub-nodes:

$ scp-r zookeeper-3.4.6 slaves8:/home/install/

$ scp-r Zookeeper-3.4.6-data slaves8:/home/install/

$ scp-r zookeeper-3.4.6 slaves9:/home/install/

$ scp-r Zookeeper-3.4.6-data slaves9:/home/install/

and make the corresponding server number modification in the corresponding myID file.

4. The zookeeper cluster built into the HBase cluster is changed to its own installed zookeeper cluster. The configuration file for HBase needs to be changed:

Hbase-env.sh:

Change export hbase_manages_zk=true to: Export Hbase_manages_zk=false

Hbase_site.xml: Comment out the following sections

<!--<property>

Set the Hbase.zookeeper.property.dataDir property to get rid of the directory address where the zookeeper holds the data.

The default value is/tmp, which is deleted by the operating system when it is restarted and can be modified

<name>hbase.zookeeper.property.dataDir</name>

<value>/home/qiao/zookeeper_data</value>

</property>

(The two files on each hbase node are modified accordingly)

5. Start zookeeper machine to zookeeper-3.4.6/bin/zkserver.sh start

Close command: zookeeper-3.4.6/bin/zkserver.sh stop

Zookeeper cluster installation (HBase cluster is installed)

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.