HBase adopts the masterslave method in distributed deployment. It consists of three major functional components: RegionServer, MasterServer, and ClientLibrary.
HBase adopts the master/slave Mode in distributed deployment. It mainly includes three major functional components: RegionServer, MasterServer, and ClientLibrary in distributed
HBase adopts the master/slave Mode in distributed deployment. It consists of three major functional components: RegionServer, MasterServer, and ClientLibrary.
Hadoop HDFS sub-framework is used in distributed storage.
Distributed computing functions based on Hadoop MapReduce implementation
1. Region
As a distributed storage unit of HBase, Region contains a group of rows. The key values of these rows are consecutive in index sorting. Therefore, in distributed storage, RowKey definition is very important, to ensure that data of the same nature is stored on the same machine, the best way is to specify similar RowKey values for them.
2. RegionServer
In HBase, RegionServer acts as a server Load balancer and interacts with the Client to perform related read/write operations.
3. MasterServer
MasterServer acts as the master and has the following responsibilities:
(1). allocates Region to RegionServer
(2) dynamically load or uninstall the RegionServer
(3) Load Balancing for RegionServer
(4) Manage Schema Definitions
Multiple master machines may exist in the system, but these machines do not run at the same time, but are in a competitive status. When the running master machine fails, the system will be transferred to another master to take over.
In HBase deployment, the Client does not interact with the Master, and all read/write operations are completed through the RegionServer. The master plays a role in load balancing, when a RegionServer has a large load volume, the master can re-deploy the corresponding Region to distribute the pressure on multiple machines.
4. ClientLibrary
The client class library communicates with the RegionServer and caches the RegionServer and its stored Region address to accelerate the next access efficiency.
In addition, when the master machine address changes, the client uses ZooKeeper to find and locate the new master Address. ZooKeeper stores the address information of all machines, the client needs a connection environment for ZooKeeper (add the habse-site.xml to the client classpath)
5. CatelogTable
HBase predefines the distributed storage addresses used to store data in two tables:-ROOT-And. META.
-ROOT-the access address for storing. META. Data
. META. The access address of the user's Region is stored.
In this way, the ClientLibrary can traverse any Region address through-ROOT -.