* @param serverName
* @throws com.alibaba.wasp.PleaseHoldException
*/
void checkAlreadySameHostPort(final ServerName serverName)
throws PleaseHoldException {
ServerName existingServer = ServerName.findServerWithSameHostnamePort(
getOnlineServersList(), serverName);
if (existingServer != null) {
String message = "Server serverName=" + serverName
+ " rejected; we already have " + existingServer.toString()
+ " registered with same hostname and port";
LOG.info(message);
if (existingServer.getStartcode() < serverName.getStartcode()) {
LOG.info("Triggering server recovery; existingServer " + existingServer
+ " looks stale, new server:" + serverName);
expireServer(existingServer);
}
// master has completed the initialization