集群启动停止方式1[更方便]

启动

执行bin目录下的 sh start-hbase.sh ,你会发现在当前机器上启动了一个Master,在所有的机器上启动了RegionServer

  1. [root@zjj101 bin]# sh start-hbase.sh
  2. starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj101.out
  3. zjj102: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj102.out
  4. zjj103: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj103.out
  5. zjj101: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj101.out

对应的停止服务:

帮你把master 和regionserver都停止掉

  1. [root@zjj101 bin]# sh stop-hbase.sh
  2. stopping hbase.....................

集群启动停止方式2

  • 启动单个master

注意,如果使用 hbase-daemons.sh 启动Master的话,你会发现集群中多台机器都启动了Master,如果你只需要启动一个Master的话,就不用要hbase-daemons.sh , 用 hbase-daemon.sh

  1. # 启动多个Master
  2. [root@zjj101 bin]# sh hbase-daemons.sh start master
  3. zjj103: starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj103.out
  4. zjj101: starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj101.out
  5. zjj102: starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj102.out
  6. # 停止多个Master
  7. [root@zjj101 bin]# sh hbase-daemons.sh stop master
  8. zjj101: stopping master.
  9. zjj103: stopping master.
  10. zjj102: stopping master.
  11. # 启动一个Master
  12. [root@zjj101 bin]# sh hbase-daemon.sh start master
  13. starting master, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-master-zjj101.out
  • 启动多个regionserver
  1. [root@zjj101 bin]# sh hbase-daemons.sh start regionserver
  2. zjj101: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj101.out
  3. zjj102: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj102.out
  4. zjj103: starting regionserver, logging to /root/soft/hbase-1.3.1/bin/../logs/hbase-root-regionserver-zjj103.out
  • 群停止脚本

帮你把master 和regionserver都停止掉

  1. [root@zjj101 bin]# sh stop-hbase.sh
  2. stopping hbase.....................
  3. [root@zjj101 bin]#