private void processAsActiveMaster(Set<ServerName> newServers) {
    Set<ServerName> oldServers = regionServers;
    ServerManager serverManager = server.getServerManager();
    // expire dead servers
    for (ServerName crashedServer : Sets.difference(oldServers, newServers)) {
      LOG.info("RegionServer ephemeral node deleted, processing expiration [{}]", crashedServer);
      serverManager.expireServer(crashedServer);
    }
    // check whether there are new servers, log them
    boolean newServerAdded = false;
    for (ServerName sn : newServers) {
      if (!oldServers.contains(sn)) {
        newServerAdded = true;
        LOG.info("RegionServer ephemeral node created, adding [" + sn + "]");
      }
    }
    if (newServerAdded && server.isInitialized()) {
      // Only call the check to move servers if a RegionServer was added to the cluster; in this
      // case it could be a server with a new version so it makes sense to run the check.
      server.checkIfShouldMoveSystemRegionAsync();
    }
  }
Upgrade to active master mode, where besides tracking the changes of region server set, we will
also started to add new region servers to ServerManager and also schedule SCP if a region
server dies. Starts the tracking of online RegionServers. All RSes will be tracked after this
method is called.
<p/>
In this method, we will also construct the region server sets in {@link ServerManager}. If a
region server is dead between the crash of the previous master instance and the start of the
current master instance, we will schedule a SCP for it. This is done in
{@link ServerManager#findDeadServersAndProcess(Set, Set)}, we call it here under the lock
protection to prevent concurrency issues with server expiration operation.
@param deadServersFromPE          the region servers which already have SCP associated.
@param liveServersBeforeRestart   the live region servers we recorded before master restarts.
@param splittingServersFromWALDir Servers whose WALs are being actively 'split'.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionServerTracker.java