Skip to Content
HBASE技術手冊
book

HBASE技術手冊

by Lars George
December 2012
Intermediate to advanced
572 pages
13h 8m
Chinese
GoTop Information, Inc.
Content preview from HBASE技術手冊
架構
|
329
日誌結構合併樹
日誌結構合併樹(Log-Structured Merge-Trees),也稱 LSM-trees,採用一種不同的策
略。新進的資料,首先會完全依順序地被儲存在一個日誌檔案(logfile)。一旦日誌
log)的修改被儲存後,就會更新在記憶體中的儲存紀錄,為了快速查詢,記憶體會保
留最近更新的記錄。當系統已累積了足夠的更新資料,而且記憶體中的儲存區已經填滿
時,它就會刷新
key
record
的儲存清單到磁碟上,來建立一個新的儲存檔案。在這
個時候,更新到日誌的紀錄可以扔掉,因為所有的修改已經被永久儲存了。
儲存檔(store file)的排列類似 B-tree,但對循序磁碟存取做了最佳化處理,其所有節
點會完全填滿,並以單頁或者多頁的區塊儲存。儲存檔的更新是以
滾動合併
rolling
merge
)的方式進行,也就是說,系統將既有磁碟上的多頁區塊與要刷新的記憶體資料
包在一起,直到區塊達到其最大容量,才啟動一個新的儲存檔。
8-2 顯示多頁區塊如何從記憶體中的樹,合併到下一個磁碟樹。合併時將寫出一個新
的區塊,包含結合的結果。最後,樹狀結構會被合併成一個較大的區塊。
8-2 多頁區塊透過 LSM-tree 反覆合併
隨著時間的流逝,有更多的刷新動作發生,它會產生很多儲存檔,有一個背景程序會將
這些檔案聚合成更大的檔案,這樣磁碟搜尋操作就限制在少數幾個儲存檔上。磁碟樹也
可以被分割成多個磁碟樹,在跨多個儲存檔之間,進行分散更新。由於所有的儲存都是
按照 key
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Java数据科学实战

Java数据科学实战

Michael R. Brzustowicz, PhD
SQL经典实例(第2版)

SQL经典实例(第2版)

Anthony Molinaro, Robert de Graaf
機器學習|工作現場的評估、導入與實作

機器學習|工作現場的評估、導入與實作

有賀康顕, 中山心太, 西林孝

Publisher Resources

ISBN: 9789862765968