Friday, August 16, 2019

HBase Installation

The prerequisite for HBase installation are Java and Hadoop installed on your Linux machine.
Hbase can be installed in three modes: standalone, Pseudo Distributed mode and Fully Distributed mode.

Download the Hbase package from http://www.interior-dsgn.com/apache/hbase/stable/ and unzip it with the below commands.

  1. $cd usr/local/$wget http://www.interior-dsgn.com/apache/hbase/stable/hbase-0.98.8-hadoop2-bin.tar.gz  
  2. $tar -zxvf hbase-0.98.8-hadoop2-bin.tar.gz  
Login as super user as shown below
  1. $su  
  2. $password: enter your password here  
  3. mv hbase-0.99.1/* Hbase/  

Configuring HBase in Standalone Mode

Set the java Home for HBase and open hbase-env.sh file from the conf folder. Edit JAVA_HOME environment variable and change the existing path to your current JAVA_HOME variable as shown below.
  1. cd /usr/local/Hbase/conf  
  2. gedit hbase-env.sh  

Replace the existing JAVA_HOME value with your current value as shown below.
  1. export JAVA_HOME=/usr/lib/jvm/java-1.7.0  
Inside /usr/local/Hbase you will find hbase-site.xml. Open it and within configuration add the below code.
  1. <configuration>  
  2.    //Here you have to set the path where you want HBase to store its files.  
  3. <property>  
  4. <name>hbase.rootdir</name>  
  5. <value>file:/home/hadoop/HBase/HFiles</value>  
  6. </property>  
  7.       
  8.    //Here you have to set the path where you want HBase to store its built in zookeeper  files.  
  9. <property>  
  10. <name>hbase.zookeeper.property.dataDir</name>  
  11. <value>/home/hadoop/zookeeper</value>  
  12. </property>  
  13. </configuration>  

Now start the Hbase by running the start-hbase.sh present in the bin folder of Hbase.
  1. $cd /usr/local/HBase/bin  
  2. $./start-hbase.sh  
Cloudera VM is recommended as it has Hbase preinstalled on it.
Starting Hbase: Type Hbase shell in terminal to start the hbase.

1 comment:

Lab 09: Publish and subscribe to Event Grid events

  Microsoft Azure user interface Given the dynamic nature of Microsoft cloud tools, you might experience Azure UI changes that occur after t...