Install pseudo-distributed HBase 0.99.0 under Ubuntu 13.10

Source: Internet
Author: User
Tags zookeeper

HBase installation is divided into: Click Mode, Pseudo-distributed, fully distributed, in standalone mode, HBase uses the local file system instead of HDFs, and all services and zookeeper are operating in a single JVM. This article is a pseudo-distributed installation.

The installation steps are as follows

1 Environment Configuration

2 Installation Instructions

1 Environment Configuration

1.1 Java JDK installation, download JDK, configure environment variables

sudo nano/etc/profile
Export Java_home=/usr/dev/jdk1.7.0_51export Hadoop_home=/home/lcc/software/hadoop/hadoop-2.5.0export HBASE_HOME=/ Home/lcc/software/hadoop/hbase-0.99.0export Ld_library_path=/home/lcc/software/dev/protobuf-2.5.0export ANT_HOME =/usr/dev/apache-ant-1.9.4export path= $PATH: $ANT _home/bin: $JAVA _home/bin: $HADOOP _home/bin: $HBASE _home/binexport Classpath= $CLASSPATH: $JAVA _home/lib

1.2 Hadoop installation, refer to other tutorials

2 HBase Installation

2.1 Download latest Release package http://mirror.bit.edu.cn/apache/hbase/, this article is hbase-0.99.0

2.2 Configuring Environment Variables Hbase_home

2.3 Configuration Conf/hbase-site.xml, inside the parameter function can refer to Http://hbase.apache.org/book.html?spm=0.0.0.0.kJVi8l#hbase_default_configurations

<Configuration>     < Property>         <name>Hbase.rootdir</name>         <value>Hdfs://localhost:9000/hbase</value>         </ Property>           < Property>         <name>hbase.cluster.distributed</name>         <value>True</value>         </ Property>         < Property>           <name>Dfs.replication</name>               <value>1</value>          </ Property>     < Property>         <name>Hbase.zookeeper.quorum</name>         <value>localhost</value>         </ Property>      < Property>            <name>Hbase.tmp.dir</name>            <value>File:/home/lcc/software/hadoop/hbase-0.99.0/tmp</value>     </ Property>         < Property>            <name>Hbase.zookeeper.property.dataDir</name>            <value>File:/home/lcc/software/hadoop/hbase-0.99.0/zookeeper</value>         </ Property></Configuration>

2.4 Configuration conf/hbase-env.sh, inside the parameter function can refer to Http://hbase.apache.org/book.html?spm=0.0.0.0.kJVi8l#hbase_default_configurations

Export java_home= "/usr/dev/jdk1.7.0_51" Export hbase_manages_zk=true

2.5 Start HBase, before you start, you need to ensure that Hadoop is started

[Email protected]:~$ start-hbase.sh
Localhost:starting zookeeper, logging to/home/lcc/software/hadoop/hbase-0.99.0/bin/. /logs/hbase-lcc-zookeeper-lcc-hp-pro-3380-mt.out
Starting Master, logging To/home/lcc/software/hadoop/hbase-0.99.0/logs/hbase-lcc-master-lcc-hp-pro-3380-mt.out

2.6 Connecting HBase

[email protected]:~$ hbase shellhbase Shell; Enter ' help < RETURN > ' for list of supported commands. Type "Exit<RETURN>" to leave the HBase shellversion 0.99.0, r757a0952ce4674704d91a858b42ea94be8199b81, Tue Sep 12:58:15 PDT

2.7 Stop HBase

[Email protected]:~$ stop-hbase.shstopping hbase.........localhost:stopping zookeeper.

--------------------------------------------------------------------------------------------------------------- ----------------------------------

To see if the boot was successful, enter JPS, see hmaster and hquorumpeer, browser input http://localhost:16030/master-status, open instructions successfully

HBase (main):001:0> [email protected]:~$ jps28522 NodeManager817 Jps27997 DataNode28206 SecondaryNameNode386 HMaster28380 ResourceManager27823 NameNode300 Hquorumpeer

View which processes the port is using

Netstat-pan | grep 16020

After installation because see no hregionserver this process, still thought the boot is wrong, start it manually

bin/hbase-daemon.sh Start Regionserver

But this command always starts unsuccessfully, view log discovery, always prompt port is occupied Lem binding to localhost/127.0.0.1:16020:address already in Use:bind

Then look at which process was occupied, found several, do not know why, and then found out

  1. Start and stop additional regionservers

    The Hregionserver manages the data in its storefiles as directed by the Hmaster. Generally, one hregionserver runs per node in the cluster. Running multiple hregionservers on the same system can is useful for testing in pseudo-distributed mode. The local-regionservers.sh command allows you to run multiple regionservers. It works in a similar-to-the- local-master-backup.sh command, in so each param Eter you provide represents the port offset for an instance. Each regionserver requires the ports, and the default ports is 16020 and 16030. however, the base ports for additional regionservers is not the default ports since the Def Ault ports is used by the Hmaster, which is also a regionserver since HBase version 1.0.0. The base ports is 16200 and 16300 instead . You can run the additional regionservers that is not a hmaster or backup hmaster, on a server. The following command starts four additional regionservers, running on sequential ports starting at 16202/16302 (base port S 16200/16300 plus 2).

    5                      

    To stop a regionserver manually, use the local-regionservers.sh command with the stop parameter and the offs Et of the server to stop.

    3

Probably mean, Hmaster occupies 16020 of this port, then use bin/hbase-daemon.sh start Regionserver start hregionserver time, will definitely error, so change with the following command to start, there is no problem

. bin/local-regionservers.sh Start 2 3 4 5


  

Install pseudo-distributed HBase 0.99.0 under Ubuntu 13.10

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.