Tutorial on getting started with Hbase configuration (0.20.6)

Source: Internet
Author: User
Hbase is a subproject of hadoop. Download the appropriate Hbase version here. Note: versions of Hadoop and Hbase cannot be used randomly. Therefore, you must first understand whether or not to match and then proceed.

Hbase is a subproject of hadoop. Download the appropriate Hbase version here. Note: versions of Hadoop and Hbase cannot be used randomly. Therefore, you must first understand whether or not to match and then proceed.

1. Hbase is a subproject of Hadoop. Download the appropriate Hbase version here. Note: versions of Hadoop and Hbase cannot be used randomly. Therefore, you need to know whether to work together before deploying the service. Otherwise, it will be a waste of time. Here we use hadoop 0.20.2 and Hbase 0.20.6. The hadoop configuration is shown in my previous blog, if you need to configure hadoop, read the article and configure Hbase. The configuration steps are as follows: hadoop first and hbase later.

2. Decompress Hbase. Specific command: tar-zxvf hbase-0.20.6.tar.gz

3. Modify the hbase-site.xml, hbase-env.sh, regionservers file under the conf directory. Looks like the configuration does not use hbase-default.xml, ignore it.

Hbase-site.xml


Hbase. rootdir
Hdfs: /// hadoopserver-1: 9000/hbase



Hbase. cluster. distributed
True



Hbase. master. port
60000


Hbase. zookeeper. quorum
Hadoopserver-1



Hbase. zookeeper. property. dataDir
/Home/hadoopuser/data/zookeeper

Explanation:

Hbase. rootdir sets the directory of hbase on hdfs. The host name is the host where the namenode node of hdfs is located.
Hbase. cluster. distributed is set to true, indicating that it is a fully distributed hbase cluster.
Hbase. master sets the master host name and port of hbase.
Hbase. zookeeper. quorum sets the zookeeper host. We recommend that you use the singular number.

Then add the following configuration in the hbase-env.sh:

Export JAVA_HOME =/usr/local/jdk1.6.0 _ 22/
Export HBASE_LOG_DIR =/home/hadoopuser/logs/hbase
Export HBASE_MANAGES_ZK = true

If you want Hbase to manage zookeeper by itself, HBASE_MANAGES_ZK must be set to true, so you do not need to manually start zookeeper because Hbase integrates zookeeper. (PS: in fact, we can define a group of zookeeper clusters to coordinate Hbase. Here we should first use the zookeeper that comes with Hbase to save trouble .)

Modify the regionservers File
Add all datanode to this file, similar to the slaves file in hadoop.

4. After the configuration is complete, start Hbase.

$ Bin/start-hbase.sh --- start hbase

$ Bin/hbase shell --- enter hbase and operate it in shell mode

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.