public void updateAssignmentPlanToMeta(FavoredNodesPlan plan) throws IOException {
    try {
      LOG.info("Start to update the hbase:meta with the new assignment plan");
      Map<String, List<ServerName>> assignmentMap = plan.getAssignmentMap();
      Map<RegionInfo, List<ServerName>> planToUpdate = new HashMap<>(assignmentMap.size());
      Map<String, RegionInfo> regionToRegionInfoMap =
        getRegionAssignmentSnapshot().getRegionNameToRegionInfoMap();
      for (Map.Entry<String, List<ServerName>> entry : assignmentMap.entrySet()) {
        planToUpdate.put(regionToRegionInfoMap.get(entry.getKey()), entry.getValue());
      }

      FavoredNodeAssignmentHelper.updateMetaWithFavoredNodesInfo(planToUpdate, conf);
      LOG.info("Updated the hbase:meta with the new assignment plan");
    } catch (Exception e) {
      LOG.error(
        "Failed to update hbase:meta with the new assignment" + "plan because " + e.getMessage());
    }
  }
Update the assignment plan into hbase:meta
@param plan the assignments plan to be updated into hbase:meta
@throws IOException if cannot update assignment plan in hbase:meta
hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java