@Override
  public void cancelConnections(ServerName sn) {
    synchronized (connections) {
      for (T connection : connections.values()) {
        ConnectionId remoteId = connection.remoteId();
        if (
          remoteId.getAddress().getPort() == sn.getPort()
            && remoteId.getAddress().getHostName().equals(sn.getHostname())
        ) {
          LOG.info("The server on " + sn.toString() + " is dead - stopping the connection "
            + connection.remoteId);
          connections.remove(remoteId, connection);
          connection.shutdown();
          connection.cleanupConnection();
        }
      }
    }
  }
Interrupt the connections to the given ip:port server. This should be called if the server is
known as actually dead. This will not prevent current operation to be retried, and, depending
on their own behavior, they may retry on the same server. This can be a feature, for example at
startup. In any case, they're likely to get connection refused (if the process died) or no
route to host: i.e. their next retries should be faster and with a safe exception.
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java