private void stopAssignmentThread() {
    assignQueueSignal();
    try {
      while (assignThread.isAlive()) {
        assignQueueSignal();
        assignThread.join(250);
      }
    } catch (InterruptedException e) {
      LOG.warn("join interrupted", e);
      Thread.currentThread().interrupt();
    }
  }
Add the assign operation to the assignment queue. The pending assignment operation will be
processed, and each region will be assigned by a server using the balancer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java