Bigdatahbase
Bigdatahbase
HBase:
It can manage structured and semi-structured data and has some built-in features such as
scalability, versioning, compression and garbage collection.
Since its uses write-ahead logging and distributed configuration, it can provide fault-tolerance
and quick recovery from individual server failures.
HBase built on top of Hadoop / HDFS and the data stored in HBase can be manipulated using
Hadoop’s MapReduce capabilities.
HDFS is a distributed file system that is well suited for storing large files. It’s designed to
support batch processing of data but doesn’t provide fast individual record lookups. HBase is
built on top of HDFS and is designed to provide access to single rows of data in large tables.
HBase Architecture
The HBase Physical Architecture consists of servers in a Master-Slave relationship. Typically, the
HBase cluster has one Master node, called HMaster and multiple Region Servers called
HRegionServer. Each Region Server contains multiple Regions – HRegions.
Just like in a Relational Database, data in HBase is stored in Tables and these Tables are stored
in Regions. When a Table becomes too big, the Table is partitioned into multiple Regions. These
Regions are assigned to Region Servers across the cluster. Each Region Server hosts roughly the
same number of Regions. The HMaster in the HBase is responsible for Performing
Administration Managing and Monitoring the Cluster Assigning Regions to the Region Servers
Controlling the Load Balancing and Failover.
23
HBase Installation steps:
Step 1: Prerequisites
iii.hadoop installed.
24
https://hbase.apache.org/downloads.html
export HBASE_HOME=~/hbase
25
export PATH=$PATH:$HBASE_HOME/bin
*Once you add the variables, save and exit the .bashrc file. ctrl+s & ctrl+x.
*Run the command below to apply the changes to the current running environment:
/usr/lib/jvm/java-8-openjdk-amd64
a. Use the previously created $HBASE_HOME variable to access the hbase-env.sh file:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
vaagdevi:~/hdoop$ cd /hbase/conf
a. Edit hbase-site.xml
//Here you have to set the path where you want HBase to store its files.
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
//Here you have to set the path where you want HBase to store its built in zookeeper files.
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/vaagdevi/hdoop/hbase/zookeeper</value>
</property>
<property>
27
<!-- Write Ahead Log -->
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>/home/vaagdevi/hdoop/hbase/HFiles</value>
</property>
(now create 2 directories with "HFiles" & "zookeeper" to store logs in hbase folder)
28
vaagdevi:~/hdoop/hbase/bin$ start-hbase.sh
vaagdevi:~/hdoop/hbase/bin $ jps
NameNode
DataNode
ResourceManager
NodeManager
HMaster
shell> status
29
**to create a table (create <table name>,<column family> )
**to verify
shell> list
30
Step 8: Access the HBase Web UI
http://localhost:16010
31