Introduction to HBase Architecture
HBase is an open-source, distributed key-value data storage system and column-oriented database with high write output and low latency random read performance. By using HBase, we can perform online real-time analytics. HBase architecture has strong random readability. In HBase, data is sharded physically into what are known as regions. A single region server hosts each region, and one or more regions are responsible for each region server. The HBase Architecture is composed of master-slave servers. The cluster HBase has one Master node called HMaster and several Region Servers called HRegion Server (HRegion Server). There are multiple regions – regions in each Regional Server.
HDFS Storage Mechanism
In HDFS, Data is stored in the table, as shown above.
Each row has a key.
Column: It is a collection of data belonging to one column family, which is included inside the row.
Column Family: Each column family consists of one or more columns.
Each table contains a collection of Columns Families. These Columns are not part of the schema.
HBase has Dynamic Columns. Different cells can have other columns because column names are encoded inside the cells.
Column Qualifier: Column name is known as the Column qualifier.
HBase Architecture Components
There are main elements in the HBase architecture: HMaster and Region Server. Regional HBase Saving Data.
The HMaster node is lightweight and used for assigning the region to the server region.
There are some main responsibilities of Hmaster, which are:
- First, carrying out some administration tasks, including loading, balancing, creating data, updating, deletion, etc.
Responsible for changes in the schema or modifications in META data according to the direction of the client application
- HMaster handles much DDL work on HBase tables.
Some of the methods that HMaster Interface exposes are mainly. META data-oriented methods.
- Table (create, remove, enable, disable, remove Table)
- ColumnFamily (add Column, modify Column)
- Region (move, assign)
The client communicates with both HMaster and ZooKeeper bi-directionally. It contacts HRegion servers directly to read and write operations. HMaster assigns regions to servers in the region and, in turn, checks regional servers ‘ health status.
2. Region Server
We can get a rough idea about the region server by a diagram given below.
Region Servers are working nodes that handle customers’ requests for reading, writing, updating, and deleting. Region Server is lightweight; it runs at all of the nodes on the cluster Hadoop. The region server’s main task is to save the data in areas and perform customer requests. Another important task of the HBase Region Server is to use the Auto-Sharding method to perform load balancing by dynamically distributing the HBase table when it becomes too large after inserting data.
Multiple HRegion servers can be contacted by HMaster and perform the following functions:
- Managing and Regions hosting
- Automatically split regions
- Handling of requests for reading and writing
- Direct customer communication
HDFS stands for the Hadoop Distributed File system. It stores every file in several blocks and replicates blocks across a Hadoop cluster to maintain fault tolerance. HDFS delivers high fault tolerance and works with low-cost materials. Using cheap commodity hardware to add nodes to the cluster and process & save it will give the customer better results than the existing hardware. HDFS contacts the components of HBase and saves a lot of data in a distributed way.
Zookeeper is an open-source project. HMaster and HRegionServers register themselves with ZooKeeper.
It provides various services like maintaining configuration information, naming, providing distributed synchronization, etc. Distributed Synchronization is the process of providing coordination services between nodes to access running applications. It has ephemeral nodes that represent region servers. Master servers use these nodes to search for available servers.
These nodes are also used to track network partitions and server failures. Zookeeper is the interacting medium between the Client region server. If a client wants to communicate with the region server, the zookeeper is the communication medium.
How Search Initializes in HBase Architecture?
As you know, the META table location is saved by Zookeeper. Whenever a customer approaches or writes requests for HBase, the procedure is as follows.
The customer finds out from the ZooKeeper how to place them META table. The client then requests the appropriate row key from them META table to access the region server location. With the META table location, the customer caches this information. The customer shall not refer to them META table until and if the area is moved or shifted. Then the META server will be requested again, and the cache will be updated. As always, customers do not waste time finding the Region Server location on META Server, so it saves time and speeds up the search process.
It is easy to integrate from the source as well as the destination with Hadoop.
The distributed storage, like HDFS, is supported.
It has a random access feature using an internal Hash Table to store data for faster searches in HDFS files.
Advantages and Disadvantages of HBase Architecture
Below are the advantages and disadvantages:
Advantages of HBase Architecture
Below are mentioned the advantages:
- These can store large data sets.
- We can share the database.
- Gigabytes to petabytes cost-effective
- High availability through replication and failure
Disadvantages of HBase Architecture
Below are mentioned the disadvantages:
- SQL structure does not support
- Does not supports transaction
- Only with key sorted
- Cluster memory problems
HBase is one of the NoSQL column-oriented distributed databases in apache. While comparing with Hadoop or Hive, HBase performs better for retrieving fewer records. So, in this article, we discussed HBase architecture, and it’s important components.
This has been a guide to HBase Architecture. Here we discussed the Concept, Components, Features, Advantages, and Disadvantages. You can also go through our other Suggested Articles to learn more –