In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how HBase ensures the strong consistency of data". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
How does HBase ensure strong consistency of data?
There are three aspects that can be said. In addition, HBase sacrifices the availability of data to ensure the strong consistency of its data, that is, CAP principle gives up that ABE HBASE is a cp system.
1. Each piece of data in HBase will only appear in one Region, and its data redundancy backup is not done at the region level, or relies on HDFS to do the redundancy.
And a Region is assigned to only one RegionServer at a time, which ensures that there is only one piece of data that can be used in the system.
2. HBase supports row-level things, that is, a put operation either succeeds or fails.
3. In addition, when there is a RegionServer downtime, the Region is assigned to another RegionServer and the WAL Log is rewritten, and the data in the entire Region is not available in the process because it is missing.
If available, there must be data inconsistency (that is, the written data cannot be queried), so availability is used here in exchange for strong consistency, and it can not be accessed again until the WAL is written to ensure the integrity of the data.
Why is the LSM-Tree structure so much faster to write than read?
The reason why LSM-Tree structure writes quickly is that it keeps the increment of data modification in memory and writes these modifications to disk in batches after reaching the specified size limit.
It will be troublesome to read, and it is necessary to merge the historical data in the disk and the recent modification operations in memory, so the write performance is greatly improved. You may need to see if it hits the memory first when reading, otherwise you need to access more disk files.
At the extreme, the write performance of HBase based on LSM tree is one order of magnitude higher than that of MySQL, and the read performance is one order of magnitude lower.
If HMaster dies, what will be the impact on the HBase cluster?
Making it clear that HMaster's accusations will basically solve the problem.
HMaster is responsible for assigning Region to RegionServer
Responsible for load balancing of RegionServer
Discover failed RegionServer and reallocate region on it
Manage users' operations on adding, deleting, modifying and querying table
Therefore, after the HMaster outage, the data reading and writing are still normal, but the table cannot be operated, and the operations related to the allocation of region cannot be carried out.
This is the end of the content of "how HBase ensures strong consistency of data". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.