Hbase like any other NoSQL databases is a columnar NoSQL database, which workswell with semi-structures as well as with structured data.
Following are the three modes of Hbase installation:
Hbase works along with hadoop and uses Hadoop Distributed File System (HDFS) to store the data. Semi-distributed and distributed modes uses HDFS. Hbase can be configured to work with local file system by installing Hbase in standalone mode. Standalone mode is perfect for the individuals who wants to practice Hbase commands. It is strictly recommended to use Hbase alongwith Hadoop when dealing with distributed data and clusters.
As Hbase is programmed suing Java, it requires JDK to work.
Following are the steps to install Hbase in standalone mode:
Let's start with installing JDK.
sudo cp <filename>.tar.gz /usr/lib/
For example, assuming filename to be "jdk-8u102-linux-x64.tar.gz" then the command will look like "sudo cp jdk-8u102.linux-x64.tar.gz /usr/lib/" (without quotes)
sudo tar -xvf <filename>.tar.gz
sudo rm <filename>.tar.gz
Now let's begin with the actual installation of Hbase. For the tutorial purpose we are going to use the version "0.94.8" you can use whatever version of Hbase required just by replacing the filename in following commnds.
tar -xvf hbase-0.94.8.tar.gz
sudo mkdir /usr/lib/hbase
sudo mv hbase-0.94.8 /usr/lib/hbase/hbase-0.94.8
Remember to substitute path to your home directory wherever <path_to_home> occures.
sudo gedit hbase-env.sh
<property> <name>hbase.rootdir</name> <value>path_to_home/HBASE/hbase/</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>path_to_home/HBASE/zookeeper/</value> </property>
sudo gedit /etc/hosts
If every thing is done perfectly then you are good to go. Use following commands in the terminal to work with Hbase
To start Hbase -
To get Hbase shell -
To stop Hbase -
For those who don't want to go through the above procedure, we have created an installation script which will carry out the entire installation on its own. Remember to enter your user password whenever prompted for.
Download the installation file from here and install using the following procedure
tar -xvf Project_hbase
If everything is done perfectly then you are good to go. Use above mentioned commands to start, stop and use Hbase
Have anything to add or need help, just ping
Remember "Sharing is Caring"
request failed! Contact admin.