If you have successfully configured Hadoop on a single machine in pseudo-distributed mode and looking for some help to use Hbase on top of that then you may find this writeup useful. Please let me know if you face any issue.

Since you are able to use Hadoop, I am assuming you have all the pieces in place . So we'll directly start with Habse configuration. Please follow the steps shown below to do that:

1 - Download the Hbase release from one of the mirrors using the link shown below. Then unzip it at some convenient location (I'll call this location as HBASE_HOME now on) -

2 - Go to the /conf directory inside the unzipped HBASE_HOME and do these changes :

     - In the file modify these line as shown :
       export JAVA_HOME=/usr/lib/jvm/java-6-sun
       export HBASE_MANAGES_ZK=true

     - In the hbase-site.xml add these properties :
           <value>SAME VALUE AS YOUR IN core-site.xml/hbase</value>

3 - Now copy the hadoop-core-*.jar from your HADOOP_HOME and commons-collections-3.2.1.jar from HADOOP_HOME/lib folder into your HBASE_HOME/lib folder.

4 - Change the line in your /etc/hosts file to Since this file protected, we need to open it with root privileges. Use the command shown below to that :
mohammad@ubuntu:~$ sudo gedit /etc/hosts
This will open the /etc/hosts file with root privileges. Modify it, and save it.

5Now go to the terminal and change the directory to your HBASE_HOME and issue this command to start the Hbase processes (your Hadoop processes must be running in advance though) :

mohammad@ubuntu:~/hbase-0.90.4$ bin/ 

If everything was fine then you will see something like this on your terminal :

localhost: starting zookeeper, logging to /home/mohammad/hbase/logs/hbase-mohammad-zookeeper-ubuntu.out

starting master, logging to /home/mohammad/hbase/logs/hbase-mohammad-master-ubuntu.out

localhost: starting regionserver, logging to /home/mohammad/hbase/logs/hbase-mohammad-regionserver-ubuntu.out


NOTE : To verify whether your Hbase processes are running or not do this on your terminal :

mohammad@ubuntu:~/hbase-0.90.4$ jps

This will list down all the process running currently. If your Hbase is running fine you will see something like this :

mohammad@ubuntu:~/hbase-0.90.4$ jps
4585 SecondaryNameNode
4055 NameNode
5674 HRegionServer
5439 HMaster
5388 HQuorumPeer
4939 TaskTracker
4326 DataNode
5852 Jps
4686 JobTracker

Hbase also provides a WEB-UI which you can visit to see if everything is ok. Point your web browser to this link :

This will show you the Hbase master's web page.

6 - Now go to the Hbase shell and get yourself familiar with a few Hbase commands. To do this issue the follow command :

mohammad@ubuntu:~/hbase-0.90.4$ bin/hbase shell

This command will take you to the Hbase shell. You should be able to see this on your terminal screen by now :

mohammad@ubuntu:~/hbase-0.90.4$ bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011



1 - List the existing tables :

hbase(main):001:0> list

2 - To create a new table called table1 having a column family cf :

hbase(main):001:0> create 'table1', 'cf'
0 row(s) in 1.9500 seconds

hbase(main):002:0> list
3 row(s) in 0.0310 seconds


** For a complete know how of Hbase please visit the Hbase home page at -

Popular Posts