HBase pseudo mode install

If you have done already , then install Hadoop by following

http://jugnu-life.blogspot.com.au/2012/03/hadoop-installation-tutorial.html

Lets get HBase working

Download HBase and Zookeeper Tar ball from Apache website

Extract to some place and set environment variables ( in say .profile of your home )

export HBASE_HOME="/home/jj/software/hbase-0.94.5"
export PATH=$PATH:$HBASE_HOME/bin



export ZOOKEEPER_HOME="/home/jj/software/zookeeper-3.4.5"
export PATH=$PATH:$ZOOKEEPER_HOME/bin



HBase settings

Check DNS settings

jj@jj-VirtualBox:~$ cat /etc/hosts
127.0.0.1    localhost
127.0.0.1    jj-VirtualBox


Check both IP should be same , by default in Ubuntu its not.
HBase expects the loopback IP address to be 127.0.0.1. Ubuntu and some other distributions, for example, will default to 127.0.1.1 and this will cause problems for you.

In hbase-env.sh

export JAVA_HOME="/home/jj/software/java/jdk1.6.0_43"

Changes in
hbase-site.xml properties

Add the following

  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:8020/hbase</value>
  </property>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value>localhost</value>
  </property>

In HDFS

Create hbase directory in HDFS

$ hadoop fs -mkdir /hbase


Zookeeper settings

In conf directory of Zookeeper

Rename zoo_sample.cfg
to zoo.cfg

Change the path of

dataDir=/home/jj/software/hadoopData/zookeeper

We are ready to test


Start Hadoop

$ start-all.sh


Warning: $HADOOP_HOME is deprecated.

starting namenode, logging to /home/jj/software/hadoop-1.0.4/libexec/../logs/hadoop-jj-namenode-jj-VirtualBox.out
localhost: starting datanode, logging to /home/jj/software/hadoop-1.0.4/libexec/../logs/hadoop-jj-datanode-jj-VirtualBox.out
localhost: starting secondarynamenode, logging to /home/jj/software/hadoop-1.0.4/libexec/../logs/hadoop-jj-secondarynamenode-jj-VirtualBox.out
starting jobtracker, logging to /home/jj/software/hadoop-1.0.4/libexec/../logs/hadoop-jj-jobtracker-jj-VirtualBox.out
localhost: starting tasktracker, logging to /home/jj/software/hadoop-1.0.4/libexec/../logs/hadoop-jj-tasktracker-jj-VirtualBox.out

Check Hadoop pages

localhost:50030
localhost:50070

All fine ?

Let start HBase

HBase automatically starts zookeeper also so no need to start by own

$ start-hbase.sh


localhost: starting zookeeper, logging to /home/jj/software/hbase-0.94.5/bin/../logs/hbase-jj-zookeeper-jj-VirtualBox.out
starting master, logging to /home/jj/software/hbase-0.94.5/logs/hbase-jj-master-jj-VirtualBox.out
localhost: starting regionserver, logging to /home/jj/software/hbase-0.94.5/bin/../logs/hbase-jj-regionserver-jj-VirtualBox.out


Check HBase pages

Master
localhost:60010
Region Server

localhost:60030

All done :)

Struck somewhere ?

Post below

1 comment:

Please share your views and comments below.

Thank You.