In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what the role of each component of hbase is, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The role of Zookeeper
Ensure that there is only one master in the cluster at any time
Store the addressing entries for all Region.
Monitor the status of RegionServer in real time and inform Master of the online and offline information of Region server in real time.
Schema for storing Hbase, including what table it has and what column family it has for each table
The role of Hmaster
Zookeeper avoids the single point problem of HMaster. A Hbase cluster can launch multiple HMaster, while Zookeeper ensures that only one HMaster in the cluster is in the state of live through Election. Everything else is in a dormant state, and if there is a problem with HMaster, Zookeeper wakes up other dormant HMaster.
1. Manage users' operations of adding, deleting, modifying and querying Table
2. Manage RegionServer load balance and adjust Region distribution
3. After Region Split, distribute the new Region to different RegionServer.
4. After the RegionServer goes down, the Region managed on the RegionServer is redistributed by HMaster.
Summarize the main tasks of HMaster: 1, HTable DDL operation 2, Region assignment work. The rest is basically done by client dealing with RegionServer.
The role of HRegionServer
HRegionServer is mainly responsible for the corresponding user's IHRegionServer O requests, and then interacts with HDFS to read and write data from HDFS. Although each process is very important, I think HRegionServer is the core process in HBase.
Here is a brief description of the internal structure of HRegionServer:
HRegionServer manages a series of HRegion objects internally. Are HRegion and Region the same thing? In fact, HRegion corresponds to a Region,HRegion in Table that is encapsulated. Each HRegion consists of multiple HStore.
HStore corresponds to the Column Family in Table. No matter how much data is in this Column Family, a new HStore will be created. Therefore, it is necessary to put the data with the same attributes into the same Column Family. To avoid one access and access multiple HStore, the performance is poor. HStore is the core storage unit of HBase, while HStore consists of two parts, one MemStore and then StoreFile.
MemStore is Sorted Memory Buffer. The data written by client is first written to MemStore. When the threshold of MemStore is reached, Flush is turned into a StoreFile (HFile), and StoreFile is a file stored on the hard disk.
The first read and write of HBase
After HBase 0.96,-ROOT- Table is removed, leaving only this special catalog table called Meta Table (hbase:meta), which stores the location information of all user HRegion in the cluster, while the node (/ hbase/meta-region-server) of ZooKeeper stores directly the location of this Meta Table, and the Meta Table is as non-split as the previous-ROOT- Table. In this way, the process for the client to access the user's Table for the first time becomes:
Get the location of the hbase:meta (the location of the HRegionServer) from ZooKeeper (/ hbase/meta-region-server) and cache the location information.
Query the HRegionServer where the user Table corresponds to the requested RowKey from the HRegionServer, and cache the location information.
Read Row from query to HRegionServer.
From this process, we find that the customer will cache the location information, but the second step is only to cache the location of the HRegion corresponding to the current RowKey, so if the next RowKey to be checked is not in the same HRegion, we need to continue to query the HRegion where the hbase:meta is located. However, with the passage of time, the location information cached on the client side is more and more, so that there is no need to look up the hbase:meta Table information again. Unless a HRegion is moved due to downtime or Split, you need to re-query and update the cache.
About what the role of the components of hbase is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.