项目场景:
node01机器上有hbase主节点和Namenode,随着数据的增加,node01负载现在处于90%的状态内存也处于90%左右。 现在要求不重启切换一下Hbase主节点 ,切换到负载低的机器上
解决方案:
1.在node02 07 120上添加文件
cd $HBASE_HOME/conf/
vim backup-masters
node02
node07
node120
2.在node02 07 120上执行
cd $HBASE_HOME/bin/
./hbase-daemon.sh start master --backup
3.kill activeHmaster
kill -15 <node01 pid>
4.查看master日志
2022-08-01 13:31:27,439 INFO [master/node120:16000:becomeActiveMaster] master.HMaster: Adding backup master ZNode /hbase/backup-masters/node120,16000,1659331882336
2022-08-01 13:31:27,460 INFO [master/node120:16000] regionserver.HRegionServer: ClusterId : fc4fb2b8-596e-409f-8573-ed40d757828a
2022-08-01 13:31:27,554 INFO [master/node120:16000:becomeActiveMaster] master.ActiveMasterManager: Another master is the active master, node06,16000,1655708003308; waiting to become the next active master
5.查看16010页面
|