In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about the usefulness of HRegionServer. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
HRegionServer, which is the core module of HBase, is mainly responsible for reading and writing data to the HDFS file system in response to the user ID O request.
HRegionServer manages a series of HRegion objects internally, and each HRegion corresponds to a Region,HRegion in the Table consisting of multiple HStore. Each HStore corresponds to the storage of a Column Family in the Table, so you can see that each Column Family is actually a centralized storage unit, so it is best to put the column with common IO characteristics in a Column Family, which is the most efficient.
HStore storage is the core of HBase storage, which consists of two parts, one is MemStore and the other is StoreFiles. MemStore is Sorted Memory Buffer, and the data written by the user will first be put into MemStore. When the MemStore is full, it will be Flush into a StoreFile (the underlying implementation is HFile). When the number of StoreFile files increases to a certain threshold, Compact merge operation will be triggered, multiple StoreFiles will be merged into a StoreFile, and version merging and data deletion will be carried out in the merge process, so we can see that HBase can only add data. All the updates and deletions are carried out in the subsequent compact process, which makes the user's write operations can be returned as soon as they enter the memory, ensuring the high performance of HBase I Pot O. After StoreFiles Compact, a larger and larger StoreFile will be gradually formed. When the size of a single StoreFile exceeds a certain threshold, the Split operation will be triggered, and the current Region Split will be changed into two Region, and the parent Region will be offline, and the Region of the two children from the new Split will be assigned to the corresponding HRegionServer by HMaster, so that the pressure of the original one Region can be diverted to the two Region. The following figure describes the process of Compaction and Split:
After understanding the basic principles of the above HStore, we must also understand the functions of HLog, because there is no problem with the above HStore under the premise that the system is working normally, but in a distributed system environment, system errors or downtime cannot be avoided, so once HRegionServer exits unexpectedly, the memory data in MemStore will be lost, which requires the introduction of HLog. There is a HLog object in each HRegionServer. HLog is a class that implements Write Ahead Log. Each user operation writes a piece of data to the HLog file (see the following HLog file format). The HLog file periodically scrolls out the new file and deletes the old file (data that has been persisted to the StoreFile). When HRegionServer terminates unexpectedly, HMaster will perceive through Zookeeper that HMaster will first process the legacy HLog file, split the Log data of different Region into the corresponding region directory, and then redistribute the invalid region. In the process of Load Region, the HRegionServer of these region will find that there is a historical HLog to deal with, so the data in Replay HLog will be transferred to MemStore, and then flush to StoreFiles to complete the data recovery.
Thank you for reading! This is the end of this article on "what's the use of HRegionServer?". I hope the above content can be of some help to you, so that 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.