Install HBase in full distributed mode (mysql)] [illustration]

Source: Internet
Author: User
Tags zookeeper metabase

The first step is to complete the distributed installation of HBase. The environment for this deployment is Hadoop-1.2.1 + hbase-0.98.X. Because this version of HBase is directly corresponding to the hadoop-1.2.1, it saves the steps to overwrite the jar package and eliminate the instability caused by overwrite. OK, unzip the package, enter the conf Directory, configure the hbase-env.sh file. As shown in the figure. HBASE_CLASSPATH points to the conf directory of hadoop.

The following describes how to enable zookeeper.

Next, configure the hbase-site.xml. The hbase directory in the HDFS file system needs to be created. Then, the last two attributes are the nodes that specify zookeeper and the directories that store data.

Finally, configure regionserver. HMaster is h2, regionserver is h3, h4.

Start HBase. Before that, make sure that hadoop has been started!

Next, disable hbase.

The following is the installation of Hive remote mode (mysql as a MetaBase ). The environment built here is Hadoop-1.2.1 + hive-0.12.0.

First, download hive and decompress it to enter the conf directory. Copies a hive-env.sh.template to a hive-env.sh. Configure the following options.

The first one is HADOOP_HOME =/home/leung/hadoop1 (this is determined by the hadoop installation directory ); the second is HIVE_CONF_DIR =/home/leung/hive/conf (this is determined by the location of your hive directory ). Below is a copy of hive-default. xml into a hive-site.xml. Then configure several attributes. As shown in the figure. First, change the metastore. local attribute to false.

First, specify the mysql location, then the local thrift, and then the jdbc driver name.

Specify the username and password used to connect to mysql. This user must first create and grant certain permissions in mysql!

Finally, set the following attribute to false. At the same time, it should be noted that there is an error about 2000 lines in this file, which is written. Let's take a look at the universe when installing it.

OK. After the configuration is complete, you can start it. First, start the MetaBase: hive -- service metastore &; and then start hiveserver: hive -- service hiveserver &. Then you can start hive normally.

At the same time, let's go to another node to see what changes the database has.

We can see that there are so many more tables in the original empty hive database. These are created after hive is started, and we can query the Tsung table to see the information of creating table a in hive.

Now, HBase and Hive have been installed successfully!

Related Article

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.