public synchronized List<ServerName> getFavoredNodesWithDNPort(RegionInfo regionInfo) {
    if (getFavoredNodes(regionInfo) == null) {
      return null;
    }

    List<ServerName> fnWithDNPort = Lists.newArrayList();
    for (ServerName sn : getFavoredNodes(regionInfo)) {
      fnWithDNPort
        .add(ServerName.valueOf(sn.getHostname(), datanodeDataTransferPort, NON_STARTCODE));
    }
    return fnWithDNPort;
  }
This should only be used when sending FN information to the region servers. Instead of sending
the region server port, we use the datanode port. This helps in centralizing the DN port logic
in Master. The RS uses the port from the favored node list as hints.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodesManager.java