Installing HBase 1.X in Pseudo Distributed Cluster

Hi HBase Listeners,

This Article will provide you some basic information about the installation of HBase Pseudo cluster. Follow the steps and get Nosql database in your machine and start processing.

Hbase-1x_pseudo_node_installation

HBase Cluster Setup :

Step 1:

Download HBase from its official Site  and Untar it.

Download hbase-*.*.tar.gz
$tar –zxvf hbase-*.*.tar.gz

$cd hbase-*.*/conf

Properties:

hbase.rootdir

The directory shared by region servers and into which HBase persists. The URL should be ‘fully-qualified’. For Instance, to specify the HDFS directory ‘/hbase’ where the HDFS instance’s namenode is running at namenode.example.org on port 9000, set this value to: hdfs://namenode.example.org:9000/hbase. By default, it writes to ${hbase.tmp.dir} is set usually as /tmp. So change this configuration or else all data will be lost on machine restart.

hbase.master.port
The port, HBase Master should bind to

hbase.cluster.distributed
Mode, the cluster will be in. Possible values are false for standalone mode and true for distributed mode. If false, startup will run all HBase and ZooKeeper daemons together in one JVM.

hbase.zookeeper.quorum
Comma separated list of servers in the ZooKeeper ensemble (This config. should have been named hbase.zookeeper.ensemble). For example, “host1.mydomain.com,host2.mydomain.com,host3.mydomain.com”. By default this is set to localhost for local and pseudo-distributed modes of operation. For a fully-distributed setup, this should be set to a full list of ZooKeeper ensemble servers. If HBASE_MANAGES_ZK is set in hbase-env.sh this is the list of servers which hbase will start/stop ZooKeeper on as part of cluster start/stop. Client-side, we will take this list of ensemble members and put it together with the hbase.zookeeper.clientPort config. and pass it into zookeeper constructor as the connectString parameter.

hbase.zookeeper.property.maxClientCnxns
Property from ZooKeeper’s config zoo.cfg. Limit on number of concurrent connections (at the socket level) that a single client, identified by IP address, may make to a single member of the ZooKeeper ensemble. Set high to avoid zk connection issues running standalone and pseudo-distributed.

Basic Prerequisites

HBase Version JDK 6 JDK 7 JDK 8
1 Not Supported yes Running with JDK 8 will work but is not well tested.
0.98 yes yes Running with JDK 8 will work but is not well tested.
0.96 yes yes N/A
0.94 yes yes N/A

Hadoop version support matrix

“S” = supported
“X” = not supported
“NT” = Not tested

HBase-0.92.x HBase-0.94.x HBase-0.96.x HBase-0.98.x (Support for Hadoop 1.1+ is deprecated.) HBase-1.0.x (Hadoop 1.x is NOT supported)
Hadoop-0.20.205 S X X X X
Hadoop-0.22.x S X X X X
Hadoop-1.0.x X X X X X
Hadoop-1.1.x NT S S NT X
Hadoop-0.23.x X S NT X X
Hadoop-2.0.x-alpha X NT X X X
Hadoop-2.1.0-beta X NT S X X
Hadoop-2.2.0 X NT S S NT
Hadoop-2.3.x X NT S S NT
Hadoop-2.4.x X NT S S S
Hadoop-2.5.x X NT S S S

Configuration:

$vi hbase-site.xml

<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:50000/hbase</value>
</property>

<property>
<name>hbase.master.port</name>
<value>60001</value>
</property>

<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>

<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>

<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>35</value>
</property>

Set the JAVA path in Hbase Environment path

$vi .hadoop-env.sh

export JAVA_HOME=/home/bigdata/jdk1.6.0_(JavaVersion)

Change the host :

$sudo vi /etc/hosts

127.0.0.1

127.0.1.1  change it as 127.0.0.1

Start the Hadoop cluster and Start Hbase 

$bin/start-hbase.sh

Jps lists JVM processes running on local and remote machines.

$jps

HBase deamons

HMaster
HRegionServer
HQuorumPeer

—————————————-
Browser : localhost:60010

Start the Hbase CLI

$bin/hbase shell

list

OK
—————————————————————————————————————-
Stop Hbase with below command

$bin/stop-hbase.sh

———————————-

Article written by DataDotz Team

DataDotz is a Chennai based BigData Team primarily focussed on consulting and training on technologies such as Apache Hadoop, Apache Spark , NoSQL(HBase, Cassandra, MongoDB), Search and Cloud Computing.

Note: DataDotz also provides classroom based Apache Kafka training in Chennai. The Course includes Cassandra , MongoDB, Scala and Apache Spark Training. For more details related to Apache Spark training in Chennai, please visit http://datadotz.com/training/