public static void updateMetaWithFavoredNodesInfo(
    Map<RegionInfo, List<ServerName>> regionToFavoredNodes, Configuration conf) throws IOException {
    // Write the region assignments to the meta table.
    // TODO: See above overrides take a Connection rather than a Configuration only the
    // Connection is a short circuit connection. That is not going to good in all cases, when
    // master and meta are not colocated. Fix when this favored nodes feature is actually used
    // someday.
    try (Connection conn = ConnectionFactory.createConnection(conf)) {
      updateMetaWithFavoredNodesInfo(regionToFavoredNodes, conn);
    }
  }
Update meta table with favored nodes info
hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java