public int getVersionNumber(ServerName serverName) {
    ServerMetrics serverMetrics = onlineServers.get(serverName);
    return serverMetrics != null ? serverMetrics.getVersionNumber() : 0;
  }
May return 0 when server is not online.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java