Got it

[FI Components] Basic Principle about HBase

Latest reply: May 10, 2022 03:10:15 1007 11 10 0 0

Hi, everyone!

Today I’m going to introduce you HBase. HBase is a distributed, column-oriented storage system built on the Hadoop Distributed File System (HDFS). The column-based HBase features high reliability, performance, and scalability. HBase is suitable for storing big table data (a table containing billions of rows and millions of columns) and allows real-time data access.

  • Uses the HDFS as the file storage system to provide database systems with high reliability, high performance, column-based storage, scalability, and real-time read and write capabilities.

  • Allows Spark and Hadoop MapReduce to process mass data in real time.

  • Uses ZooKeeper as the co-ordination service.


An HBase cluster consists of active and standby HMaster processes and multiple RegionServer processes, as shown in Figure 1.

Figure 1 HBase architecture

Table 1 HBase modules




Also called HMaster. In High Availability (HA) mode, Master involves the active Master and standby Master.

· Active HMaster: Manages RegionServer in HBase, including the creation, deletion, modification, and query of a table, balances the load of RegionServer, adjusts the distribution of Region, splits Region and distributes Region after it is split, and migrates Region after RegionServer expires.

· Standby HMaster: Takes over services from the active HMaster if the active HMaster is faulty. The original active HMaster serves as the standby HMaster when the fault is rectified.


Client communicates with Master and RegionServer by using the Remote Procedure Call (RPC) mechanism of HBase. Client communicates with Master for management and with RegionServer for data operation.


Provides read/write services of table data as a data processing and computing unit in HBase.

The RegionServer is usually deployed with the DataNode of the HDFS cluster to store data.

ZooKeeper cluster

Provides distributed coordination services for processes in the HBase cluster. Each RegionServer is registered with ZooKeeper so that Active HMaster can obtain the health status of each RegionServer.

HDFS cluster

Provides highly reliable file storage services for HBase. All HBase data is stored in the HDFS.


·        HBase Data Model

Data is stored as tables in HBase. Figure 2 shows the HBase data model. Data in a table is divided into multiple Regions, which are allocated by HMaster to RegionServers for management.

Each Region contains data within a Row Key range. At the beginning, an HBase data table contains only one Region. As data increases and reaches the upper limit of the Region capacity, the Region is split into two Regions.

Figure 2 HBase data model

Table 2 Columns in a data model



Row Key

Functions as the primary key of a relationship table, which is the unique ID of the data in each row. A RowKey can be a string, integer, or binary string. All records are stored after being sorted by RowKey.


Indicates the time stamp of a data operation. Data can be specified with different versions by time stamp. Data of different versions in each cell is stored by time in descending order.


The smallest store unit of HBase, which consists of Key and Valve. The Key consists of 6 fields: row, column, family column, qualifier, timestamp type, and MVCC version. The Value is the binary data object that is stored.

Column Family

Indicates the column family. A table consists of one or multiple column families horizontally. A column family can consist of multiple random columns. A column is a label under the column family, which can be added as required when data is written. The column family supports dynamic expansion so the number and type of columns do not need to be predefined. Columns of a table in HBase are sparsely distributed. The number and type of columns in different rows can be different. Each column family has the independent time to live (TTL). You can lock the row only. Operations on a row are always original operations.


Similar to traditional databases, HBase tables also use columns to store data of the same type.

·        RegionServer Data Storage

RegionServer manages Regions allocated by HMaster. Figure 3 shows the RegionServer data storage structure.

Figure 3 RegionServer data storage structure

Table 3 describes each component shown in Figure 3.

Table 3 Region structure




A Region consists of one or multiple Stores. Each Store maps a Column Family.


A Store contains one MemStore. The MemStore caches data inserted by the client to the Region. When the MemStore size reaches the upper limit, RegionServer flushes data in MemStore to the HDFS.


The data flushed on the HDFS is stored as a StoreFile in the HDFS. As more data is inserted, multiple StoreFiles are generated in a Store. When the number of StoreFiles reaches the limit, RegionServer merges multiple StoreFiles into a big StoreFile.


HFile defines the storage format of StoreFiles in a file system. HFile is underlying implementation of StoreFile.


HLogs prevent data loss when RegionServer is faulty. Multiple Regions in a RegionServer share the same HLog.

·        Metadata Table

The metadata table is a special HBase table, which is used by the client to locate a Region. Metadata table includes hbase:meta table.hbase:meta table records Region information of user tables, such as the Region location and start and end Row Keys.

Figure 4 shows the mapping relationships between metadata tables and user tables.

Figure 4 Mapping relationships between metadata tables and user tables

·        Data Processing Process

Figure 5 shows how data is processed in HBase.

Figure 5 Data processing process

1.    When adds, deletes, modifies, and queries HBase data, the HBase client first connects to ZooKeeper to obtain information (Operations that modify the namespace, such as the creation and deletion of the table, need to access HMaster to update the meta information.) about the RegionServer where the hbase:meta table is located.

2.    The HBase client connects to the RegionServer where the Region of the hbase:meta table is located and obtains the information about the RegionServer where the Region of the user table is located.

3.    The HBase client connects to the RegionServer where the Region of the user table is located and issues a data operation command to the RegionServer. The RegionServer executes the command.

To improve data processing efficiency, the HBase client caches Region information of the hbase:meta table, and user table in memory. When an application initiates a data operation, the HBase client queries the Region information from the memory. If no match is found in the memory, the HBase client performs the preceding operations to obtain Region information of the hbase:meta table, and user table.

If you have anything about HBase. Go ahead and share it with us!


The post is synchronized to: FusionInsight Components

  • x
  • convention:

Admin Created Oct 11, 2021 01:54:06

  • x
  • convention:

little_fish Created Oct 11, 2021 09:14:11 (0) (0)
MVE Created Oct 11, 2021 09:12:23

I very much appreciate your great support [FI Components] Basic Principle about HBase-4213431-1
View more
  • x
  • convention:

little_fish Created Oct 11, 2021 09:13:58 (0) (0)
MVE Created Oct 11, 2021 13:28:01

Good thanks
View more
  • x
  • convention:

little_fish Created Oct 12, 2021 01:15:20 (0) (0)
Created Oct 11, 2021 13:40:50

Good share
View more
  • x
  • convention:

little_fish Created Oct 12, 2021 01:15:45 (0) (0)
MVE Author Created Oct 11, 2021 13:43:42

Thanks for sharing.
View more
  • x
  • convention:

little_fish Created Oct 12, 2021 01:15:51 (0) (0)
Created May 10, 2022 03:10:15

Thanks for sharing.
View more
  • x
  • convention:


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.