protected void stopServiceThreads() {
    // clean up the scheduled chores
    stopChoreService();
    if (bootstrapNodeManager != null) {
      bootstrapNodeManager.stop();
    }
    if (this.cacheFlusher != null) {
      this.cacheFlusher.shutdown();
    }
    if (this.walRoller != null) {
      this.walRoller.close();
    }
    if (this.compactSplitThread != null) {
      this.compactSplitThread.join();
    }
    stopExecutorService();
    if (sameReplicationSourceAndSink && this.replicationSourceHandler != null) {
      this.replicationSourceHandler.stopReplicationService();
    } else {
      if (this.replicationSourceHandler != null) {
        this.replicationSourceHandler.stopReplicationService();
      }
      if (this.replicationSinkHandler != null) {
        this.replicationSinkHandler.stopReplicationService();
      }
    }
  }
Wait on all threads to finish. Presumption is that all closes and stops have already been
called.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java