@Override
  public void stop(String msg) {
    if (!this.stopped) {
      LOG.info("***** STOPPING master '" + this + "' *****");
      this.stopped = true;
      LOG.info("STOPPED: " + msg);
      // Wakes run() if it is sleeping
      sleeper.skipSleepCycle();
      if (this.activeMasterManager != null) {
        this.activeMasterManager.stop();
      }
    }
  }
Shutdown the cluster. Master runs a coordinated stop of all RegionServers and then itself.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java