方法一
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機器在本集羣不同組之間移動