Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the working Mechanism of Hbase

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to write the working mechanism of Hbase, the article is very detailed, has a certain reference value, interested friends must read it!

1. When Hbase performs a write operation, it will first record the write action in hlog,memstore, and the record operation will be successful only after the completion of both places is confirmed.

Memstore is a buffer in memory, and Hbase accumulates in this buffer before writing to the hard disk. When the amount of data in MemStore reaches the threshold, it begins to write to the hard disk. A HFile file is generated in the column family, and a column family can have multiple HFile files.

2. Now we are faced with a problem. It is normal for a failure to occur in a large cluster. What if the MemStore does not swipe and the server hangs up?

The mechanism adopted by Hbase is to write wal before the write action is completed. Each server maintains a WAL file and records the changes. It is not considered successful until the new record is successfully written in the file. If there is a crash, the data can be recovered through WAL. You do not need to perform the restore manually. If you want to disable wal, you can use the

Put p = new Put ()

P.setWriteToWal (false)

To disable it.

The above is all the contents of the article "how to write the working Mechanism of Hbase". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report