public void initializeFromMeta() throws IOException {
    SnapshotOfRegionAssignmentFromMeta snapshot =
      new SnapshotOfRegionAssignmentFromMeta(provider.getConnection());
    snapshot.initialize();
    // Add snapshot to structures made on creation. Current structures may have picked
    // up data between construction and the scan of meta needed before this method
    // is called. See HBASE-23737 "[Flakey Tests] TestFavoredNodeTableImport fails 30% of the time"
    synchronized (this) {
      this.globalFavoredNodesAssignmentPlan
        .updateFavoredNodesMap(snapshot.getExistingAssignmentPlan());
      primaryRSToRegionMap.putAll(snapshot.getPrimaryToRegionInfoMap());
      secondaryRSToRegionMap.putAll(snapshot.getSecondaryToRegionInfoMap());
      teritiaryRSToRegionMap.putAll(snapshot.getTertiaryToRegionInfoMap());
      datanodeDataTransferPort = getDataNodePort(provider.getConfiguration());
    }
  }
Datanode port to be used for Favored Nodes.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodesManager.java