集群启动停止方式1[更方便]
启动
执行bin目录下的 sh start-hbase.sh ,你会发现在当前机器上启动了一个Master,在所有的机器上启动了RegionServer
[root@zjj101 bin]# sh start-hbase.sh
starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj101.out
zjj102: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj102.out
zjj103: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj103.out
zjj101: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj101.out
对应的停止服务:
帮你把master 和regionserver都停止掉
[root@zjj101 bin]# sh stop-hbase.sh
stopping hbase.....................
集群启动停止方式2
- 启动单个master
注意,如果使用 hbase-daemons.sh 启动Master的话,你会发现集群中多台机器都启动了Master,如果你只需要启动一个Master的话,就不用要hbase-daemons.sh , 用 hbase-daemon.sh
# 启动多个Master
[root@zjj101 bin]# sh hbase-daemons.sh start master
zjj103: starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj103.out
zjj101: starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj101.out
zjj102: starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj102.out
# 停止多个Master
[root@zjj101 bin]# sh hbase-daemons.sh stop master
zjj101: stopping master.
zjj103: stopping master.
zjj102: stopping master.
# 启动一个Master
[root@zjj101 bin]# sh hbase-daemon.sh start master
starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj101.out
- 启动多个regionserver
[root@zjj101 bin]# sh hbase-daemons.sh start regionserver
zjj101: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj101.out
zjj102: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj102.out
zjj103: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj103.out
- 群停止脚本
帮你把master 和regionserver都停止掉
[root@zjj101 bin]# sh stop-hbase.sh
stopping hbase.....................
[root@zjj101 bin]#