public synchronized Set<RegionInfo> getRegionsOfFavoredNode(ServerName serverName) {
    Set<RegionInfo> regionInfos = Sets.newHashSet();

    ServerName serverToUse = ServerName.valueOf(serverName.getAddress(), NON_STARTCODE);
    if (primaryRSToRegionMap.containsKey(serverToUse)) {
      regionInfos.addAll(primaryRSToRegionMap.get(serverToUse));
    }
    if (secondaryRSToRegionMap.containsKey(serverToUse)) {
      regionInfos.addAll(secondaryRSToRegionMap.get(serverToUse));
    }
    if (teritiaryRSToRegionMap.containsKey(serverToUse)) {
      regionInfos.addAll(teritiaryRSToRegionMap.get(serverToUse));
    }
    return regionInfos;
  }
Get the replica count for the servers provided.
<p/>
For each server, replica count includes three counts for primary, secondary and tertiary. If a
server is the primary favored node for 10 regions, secondary for 5 and tertiary for 1, then the
list would be [10, 5, 1]. If the server is newly added to the cluster is not a favored node for
any region, the replica count would be [0, 0, 0].
hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodesManager.java