HBase在线平滑迁移region
此方式可以用作hbase配置修改,平滑重启regionserver,或移除某个rs节点
关闭自动balancer
通过hbase shell 关闭自动balancer
hbase(main)> balance_switch false
转移RS上的region
使用hbase自带的rb脚本,在hbase bin目录下面
unload:转移rs上的region;load:将所有region转移到此rs
sudo -u hbase hbase org.jruby.Main ./bin/region_mover.cdh.rb unload hostname
等待执行进度完成
下线RS
./bin/hbase.sh regionserver stop
开启自动balancer
通过hbase shell 关闭自动balancer
hbase(main)> balance_switch true
上线RS
./bin/hbase.sh regionserver start
启动balance
hbase(main)> balancer