public synchronized boolean addServerToDrainList(final ServerName sn) {
    // If master is not rejecting decommissioned hosts, warn if the server (sn) is not online.
    // However, we want to add servers even if they're not online if the master is configured
    // to reject decommissioned hosts
    if (!rejectDecommissionedHostsConfig && !this.isServerOnline(sn)) {
      LOG.warn("Server {} is not currently online. Ignoring request to add it to draining list.",
        sn);
      return false;
    }

    // Add the server to the draining servers lists, if it's not already in it.
    if (this.drainingServers.contains(sn)) {
      LOG.warn(
        "Server {} is already in the draining server list. Ignoring request to add it again.", sn);
      return true;
    }

    LOG.info("Server {} added to draining server list.", sn);
    return this.drainingServers.add(sn);
  }
Add the server to the drain list.
@return True if the server is added or the server is already on the drain list.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java