Skip to main content

HBase Fully Distributed Installation

Deploying a Fully-Distributed HBase Cluster

For the purpose of clarity and ease of expression, I'll be assuming that we are setting up a cluster of 3 nodes with IP Addresses.

    192.168.0.1
    192.168.0.2
    192.168.0.3

where 192.168.0.1 would be the master and 192.168.0.2,3 would be the slaves/region servers.

HBase by default manages a ZooKeeper "cluster" for you. It will start and stop the ZooKeeper ensemble as part of the HBase start/stop process.

Step 1: Assign hostnames to all the nodes of the cluster.

    192.168.0.1 master
    192.168.0.2 regionserver1
    192.168.0.3 regionserver2  

On the Master Node(192.168.0.1) add:

    192.168.0.1 master
    192.168.0.2 regionserver1
    192.168.0.3 regionserver2  

On the Region Server 1(192.168.0.2) add:

    192.168.0.1 master
    192.168.0.2 regionserver1

And on the Region Server 2(192.168.0.3) add:

    192.168.0.1 master
    192.168.0.3 regionserver2

Step 2: Download a stable release of hbase and untar it at a suitable location on all the hbase cluster nodes.

Step 3: Edit the /conf/hbase-env.sh file on all the hbase cluster nodes to add the JAVA_HOME (for eg. /usr/lib/jvm/java-1.7.0-openjdk-amd64/) and to set the HBASE_MANAGES_ZK to true to indicate 
that HBase is supposed to manage the zookeeper ensemble internally.

    export JAVA_HOME=your_java_home
    export HBASE_MANAGES_ZK=true

Step 4: Edit the /conf/hbase-site.xml on all the hbase cluster nodes which after your editing should look like:

    <configuration>
    <property>
        <name>hbase.master</name>
        <value>192.168.0.1:60000</value>
    </property>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
    </configuration>

Here the property 'hbase.master' reflects the host and port that the HBase master(192.168.0.1) runs at. Next is the 'hbase.rootdir' property which is a directory shared by the region servers. 

Step 5: Edit the /conf/regionservers file on all the hbase cluster nodes. Add the hostnames of all the region server nodes. For eg.

    regionserver1
    regionserver2


2) Start your HBase Cluster 

Having followed the steps above, now its time to start the deployed cluster. If your have an externally managed zookeeper cluster, make sure to start it before you proceed further.
On the master node(10.10.10.1) cd to the hbase setup and run the following command

$HBASE_HOME/bin/start-hbase.sh

This would start all the master and the region servers on respective nodes of the cluster.

3) Stop your HBase Cluster 

To stop a running cluster, on the master node, cd to the hbase setup and run

$HBASE_HOME/bin/stop-hbase.sh

Comments

Popular posts from this blog

Multi Node Apache Kafka 0.9 in Linux

Manually Deploying Apache Kafka Please Install Java version 8 before proceeding the Kafka installation. 1) Edit the  /etc/hostname in each  node.         $  vi /etc/hostname                    kafka1 or kafka2 or kafka3 2) Check hostname.         $ hostname 3)  Confirm everything went right.      $ sudo hostname -F /etc/hostname 4) Now edit /etc/hosts to point one node to other nodes and do the same in each node.      $ nano /etc/hosts          127.0.0.1       localhost 127.0.1.1       ubuntu <IP of node1 >   kafka1 <IP of node2>    kafka2 <IP of node3>    kafka3 # The following lines are desirable for IPv6 capable hosts ::1     localhost ip6-localhost ip6-loopba...

StandAlone Apache Storm Installation in Ubuntu 14.04 LTS

Deploying Apache Storm  1) If Java 7 is not present, please install it. 2) Zookeeper Installation Download zookeeper-3.4.6 from Apache site       $ tar -xvf zookeeper-3.4.6.tar.gz       $ cd zookeeper-3.4.6/       $ cp conf/zoo_sample.cfg conf/zoo.cfg       $ bin/zkServer.sh start 3) Storm Cluster Installation Download the storm tarball from official Apache Mirror.  Untar it.       $ tar xzvf apache-storm-0.9.2-incubating.tar.gz Move to new directory.       $ sudo cp -R apache-storm-0.9.2-incubating /usr/lib/ Go to /usr/lib/apache-storm-0.9.2-incubating/ and configure storm.yaml present in conf folder, add the followuing line, this folder must have write permissions too. storm.zookeeper.servers:     - "localhost" storm.zookeeper.port: 2181 nimbus.host: "localhost" storm.local.dir: "/var/stormtmp"    ...

Display Android Notification On Ubuntu

LinConnect is a great project to display Android notification on a Linux desktop using LibNotify, it is written in python programming language. LinConnect runs as private server on a Wi-Fi network for the Linux desktop and Android client application which installs on Android device, Android pushes the notifications through the LinConnect-client application to the Linux desktop. There is another great feature available within in Android client application that you are free to choose apps to display notification using LinConnect client application (It works with almost all Android applications). This project is in active development, which means you may can face bugs, I haven't faced any problem with it yet. Simply it stops you to check every notification on your Android phone, so you can decide that notification is important to check or not. It is also a very convenient way to get all kind of notifications on your Linux desktop like email, text message, now playing, and such oth...