HBase2.0.2升級(jí)HBase2.2.7遇到的問題及處理方法
HBase低版本2.0+升級(jí)到HBase2.2+的方法可以參考官方文檔,如下,
https://hbase.apache.org/book.html
2.2版本移除了Unassign和Assign的Procedure,導(dǎo)致低版本升級(jí)上來后,讀取到Procedure日志內(nèi)容時(shí)會(huì)解析不出來
13.3. Upgrade from 2.0 or 2.1 to 2.2+
HBase 2.2+ uses a new Procedure form assigning/unassigning/moving Regions. It does not process HBase 2.1 and 2.0’s Unassign/Assign Procedure types. Upgrade requires that we first drain the Master Procedure Store of old style Procedures before starting the new 2.2 Master. So you need to make sure that before you kill the old version (2.0 or 2.1) Master, there is no region in transition. And once the new version (2.2+) Master is up, you can rolling upgrade RegionServers one by one.
And there is a more safer way if you are running 2.1.1+ or 2.0.3+ cluster. It need four steps to upgrade Master.
Shutdown both active and standby Masters (Your cluster will continue to server reads and writes without interruption).
Set the property hbase.procedure.upgrade-to-2-2 to true in hbase-site.xml for the Master, and start only one Master, still using the 2.1.1+ (or 2.0.3+) version.
Wait until the Master quits. Confirm that there is a 'READY TO ROLLING UPGRADE' message in the Master log as the cause of the shutdown. The Procedure Store is now empty.
Start new Masters with the new 2.2+ version.
Then you can rolling upgrade RegionServers one by one. See?HBASE-21075?for more details.
如果HBase版本是2.0.2版本要升級(jí)卻無法適用。如果在集群有數(shù)據(jù)的升級(jí)到了2.2.7版本時(shí)候,會(huì)遇到“Unsupported procedure type class org.apache.hadoop.hbaes.master.assignment.AssignProcedure found” 這樣的錯(cuò)誤。此時(shí)也沒有別的方法,只能回退或者人工操作。
這里簡單說一下2.0.2離線升級(jí)到2.2.7的步驟
1、2.0.2hbase升級(jí)前,將所有的業(yè)務(wù)表disable
2、停止hbase2.0.2集群
3、刪除zk上hbase的meta server節(jié)點(diǎn) (為了升級(jí)后meta region能正常上線)
4、刪除hdfs上hbase的master procedure文件,
5、升級(jí)替換hbase2.0.0-->hbase2.2.7的包
6、啟動(dòng)HBase,此時(shí)meta表能上線,namespace無法上線,需要人工處理,hbck2工具或者操作,見下方
7、namespace表上線后,hbase表就完全啟動(dòng)了
8,enable所有的業(yè)務(wù)表
這里第1,8步驟的disable和enable表,是因?yàn)橹苯觿h除master procedure文件,會(huì)導(dǎo)致所有的表處于一種僵死狀態(tài),不能下線也不能上線,人工操作比較難維護(hù),需要hbck2工具單獨(dú)處理,所以不如一開始就disable掉
HBase
版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請(qǐng)聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。