Hbase RegionServer 在集羣內部不同組之間移動

方法一


1.先關指定組的balance
#hbase shell進去
關某個分組:
hbase shell>group_set_balance_switch '$group1',false
關全局:
hbase shell>balance_switch false


2. 移走region
nohup hbase org.apache.hadoop.hbase.util.RegionMover -host $hostname  -group $group1 -sleeptime 1000 -checkratio 999 -threads 5&
或者
hbase org.jruby.Main /home/hadoop/hbase-current/bin/region_mover.rb unload  $hostip:60020


3.確認機器上的region已經全部移走後,移動機器到新的組
hbase shell>group_move_server  '$hostip:60020','$group2'


4.恢復balance
hbase shell>group_set_balance_switch '$group1’,true



方法二


1. 移走region
~/hbase-current/bin/graceful_stop.sh  $hostip


2.確認機器上的region已經全部移走後,移動機器到group2
hbase shell>group_move_server  '$hostip:60020','$group2'Hbase機器在本集羣不同組之間移動

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章