歡迎點擊右上角"NoSQL漫談"關注我們
Apache HBase PMC主席Michael Stack在Mail List中宣布了HBase 2.0版本已正式Release的消息,該版本可以說是迄今為止最大的一個版本,共包含了4551個Issues(截止這篇文章寫作之時,HBase社區共有20510個Issues,也就是說,這些Issues中共有22%的問題單被包含在2.0版本中):
這距離HBase 1.0版本的發布已經過去了3年多的時間:
在1.0版本正式發布之前,我們看看幾個比較大的版本相關信息:
- 0.90.0版本於2011年1月19日發布,共包含1028個Issues。
- 0.92.0版本於2012年1月23日發布,共包含695個Issues。
- 0.94.0版本於2012年5月14日發布,共包含423個Issues。
- 0.96.0版本於2013年10月19日發布,共包含290個Issues。
- 0.98.0版本於2014年2月16日發布,共包含1307個Issues。
而在2.0版本之前,共有如下幾個Minor Releases:
- 1.1.0版本於2015年5月14日發布,共包含440個Issues
- 1.2.0版本於2016年2月22日發布,共包含647個Issues
- 1.3.0版本於2017年1月16日發布,共包含895個Issues
- 1.4.0版本於2017年12月18日發布,共包含665個Issues
對比於1.0版本,只能說2.0版本中承載了太多的改動。一個版本承載了太多的Features也許是一件好事,但從質量上說,在短期上可能會帶來一點擔憂。
關於HBase版本定義
HBase從1.0.0版本開始,在版本定義上正式遵循了Semantic Versioning規範:
一個版本號,由三部分組成: MAJOR.MINOR.PATCH,關於這三部分數字的變更,定義如下:
- MAJOR版本號變更:意味著可能帶來不兼容的API變更。
- MINOR版本號變更:主要是增加了一些功能特性,但API接口卻是向前兼容的。
- PATCH版本號變更:主要是針對Bug修復。
按照該定義,我們舉例說明如下:
- 從1.0.0到2.0.0版本,可能帶來一些不兼容的API變更。
- 從1.0.0到1.1.0版本,意味著合入了一些新的Feature,但API接口卻是兼容的。
- 從1.0.0版本到1.0.1版本,只是在1.0.0版本基礎之上,做了一些Bug修復,但沒有合入新的Feature。
Semantic Versioning的相關定義,僅僅涉及對外API接口。事實上,HBase的接口可能包含了兩部分,一部分是供內部使用的Internal Interfaces,另外一部分是對外發布的External Interfaces。Coprocessors, MapReduce以及Spark所依賴的,是一些Internal Interfaces,如果這些接口發生了變更如何體現在版本號的變更中?另外,更廣泛的兼容性,應該還要包含源文件/二進位Jar包文件級別的兼容性,序列化/反序列化級別的兼容性,IPC消息的兼容性,Protobufs相關的接口變更等等。因此,HBase Semantic Versioning需要更細節的一些定義,這些最新的定義,請參考HBase官方資料中的"HBase version number and compatibility"章節。
2.0關鍵特性
關於2.0版本所包含的一些關鍵特性,在以前的很多文章中都已經揭示過,這裡再簡單闡述一下:
New region assignment manager
基於Procedure V2的AssignmentManager V2,旨在能夠更快速的分配Region,狀態機的存儲不再依賴於ZooKeeper,能夠更好的應對Region長時間RIT問題。
In-memory flush and compaction
MemStore中的數據達到一定大小以後,不是直接Flush成HDFS中的HFile文件,而是先Flush到內存中的一個不可改寫的Segment,這樣,內存中的多個Segments可以預先合併,當達到一定的大小以後,才Flush成HDFS中的HFile文件,這樣做的好處是希望有效降低Compaction所帶來的寫IO放大問題。
在《一條數據的HBase之旅,簡明HBase入門教程-Flush與Compaction》一文中,詳細介紹了該特性。
Off-heap read and write
減少對Heap內存的使用,改用Offheap區的內存,有效減少GC壓力。
Async RPC Client
利用異步RPC機制,提升客戶請求並發度,提升Client端線程資源利用率。
RegionServer Group
將RegionServer劃分成多個邏輯Group,提供多租戶能力。
MOB
讓HBase更好的支持數KB甚至數MB級別的小對象存儲,這些小對象採用獨立的HFile文件進行存儲,而且不參與普通的Compaction,這樣不會因為小對象數據使得Compaction的寫IO放大問題進一步惡化。
與1.x版本的兼容性
1.x版本的Client可以訪問2.0版本的集群,進行正常的數據讀寫操作。但從1.x版本不停服務的情況下滾動升級到2.0版本是沒法做到的,1.x版本的coprocessor/Endpoint不做改動的情況下也無法在2.0版本中正常使用。
對比HBaseCon Asia 2017大會上Stack的演講內容,似乎有了一些出入,這說明2.0版本為了發布還是不得不做了一些割捨。
附:郵件原文
以下是stack關於2.0版本發布的原始郵件內容:
From:stack <st...@apache.org>
Subject:[ANNOUNCE] Apache HBase 2.0.0 is now available for download
Date:Mon, 30 Apr 2018 23:27:24 GMT
The HBase team is happy to announce the immediate availability of Apache HBase 2.0.0.
Apache HBase™ is the Hadoop database, a distributed, scalable, big data
store. To learn more about HBase, see https://hbase.apache.org/.
HBase 2.0.0 is our second major release, the first release off the HBase
2.0 line.
Please review 'Upgrading from 1.x to 2.x' in the bundled HBase 2.0.0
Reference Guide before installing or upgrading for a list of notable
incompatibilities, major changes, and features including a new Region assignment manager ("AMv2"), a means for configuring the read and/or write path to run off-heap, and an optional In-Memory Compaction ("IMC", A.K.A "Accordion") facility.
According to our adopted Semantic Versioning guidelines[2], we allowed ourselves make breaking changes in this major version release. For example, Coprocessors will need to be recast to fit more constrained APIs and rolling upgrade of an hbase-1.x install to hbase-2.x without downtime is (currently) not possible. That said, a bunch of effort has been expended mitigating the differences; a hbase-1.x client can perform DML against an hbase-2 cluster. A bundled compatibility report showing difference from 1.2.6 may be of help[3].
For the complete list of fixes and improvements, see the included `CHANGES.md` (or online at [1]) and `RELEASENOTES.md`.
Download through an ASF mirror near you:
http://www.apache.org/dyn/closer.lua/hbase/2.0.0/
The relevant checksums files are available at:
https://www.apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.sha512
https://www.apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.sha512
Project member signature keys can be found at
https://www.apache.org/dist/hbase/KEYS
PGP signatures are available at:
https://www.apache.org/dist/hbase/2.0.0/hbase-2.0.0-src.tar.gz.asc
https://www.apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz.asc
For instructions on verifying ASF release downloads, please see
https://www.apache.org/dyn/closer.cgi#verify
Question, comments, and problems are always welcome at:
dev@hbase.apache.org.
Thanks to all who contributed and made this release possible.
Cheers,
The HBase Dev Team
1. https://s.apache.org/hbase-2.0.0-JIRA-changes
2. http://hbase.apache.org/2.0/book.html#hbase.versioning.post10
3. http://apache.mirrors.tds.net/hbase/2.0.0/compatibiliity_report_1.2.6vs2.0.0.html
精彩文章推薦
《一條數據的HBase之旅》系列連載文章:
簡明HBase入門教程-開篇
簡明HBase入門教程-Write全流程
簡明HBase入門教程-Flush與Compaction
圖資料庫相關文章:
「一起學圖資料庫」系列之圖資料庫概述
「一起學圖資料庫」系列之圖資料庫與傳統資料庫的對比分析
從擴線查詢能力分析圖資料庫Titan的設計改進點
《OpenTSDB技術原理》系列連載文章:
OpenTSDB原理系列-元數據模型
OpenTSDB原理系列-TSDB數據表設計
OpenTSDB原理系列-線程模型
OpenTSDB原理系列-讀取流程
其它精彩文章:
從HBase中移除WAL?3D XPoint技術帶來的變革
號稱十倍性能於Cassandra的ScyllaDB,究竟祭出了哪些技術"利器"?
NewSQL是否是NoSQL的取代者?
閱讀開源項目源碼的建議姿勢