private void processMetaRecord(Result result) throws IOException {
    if (result == null || result.isEmpty()) {
      return;
    }
    RegionLocations rl = CatalogFamilyFormat.getRegionLocations(result);
    if (rl == null) {
      return;
    }
    RegionInfo hri = rl.getRegionLocation(0).getRegion();
    if (hri == null) {
      return;
    }
    if (hri.getTable() == null) {
      return;
    }
    if (disabledTables.contains(hri.getTable())) {
      return;
    }
    // Are we to include split parents in the list?
    if (excludeOfflinedSplitParents && hri.isSplit()) {
      return;
    }
    HRegionLocation[] hrls = rl.getRegionLocations();

    // Add the current assignment to the snapshot for all replicas
    for (int i = 0; i < hrls.length; i++) {
      if (hrls[i] == null) {
        continue;
      }
      hri = hrls[i].getRegion();
      if (hri == null) {
        continue;
      }
      addAssignment(hri, hrls[i].getServerName());
      addRegion(hri);
    }

    hri = rl.getRegionLocation(0).getRegion();
    // the code below is to handle favored nodes
    byte[] favoredNodes = result.getValue(HConstants.CATALOG_FAMILY,
      FavoredNodeAssignmentHelper.FAVOREDNODES_QUALIFIER);
    if (favoredNodes == null) {
      return;
    }
    // Add the favored nodes into assignment plan
    ServerName[] favoredServerList = FavoredNodeAssignmentHelper.getFavoredNodesList(favoredNodes);
    // Add the favored nodes into assignment plan
    existingAssignmentPlan.updateFavoredNodesMap(hri, Arrays.asList(favoredServerList));

    /*
     * Typically there should be FAVORED_NODES_NUM favored nodes for a region in meta. If there is
     * less than FAVORED_NODES_NUM, lets use as much as we can but log a warning.
     */
    if (favoredServerList.length != FavoredNodeAssignmentHelper.FAVORED_NODES_NUM) {
      LOG.warn("Insufficient favored nodes for region " + hri + " fn: "
        + Arrays.toString(favoredServerList));
    }
    for (int i = 0; i < favoredServerList.length; i++) {
      if (i == PRIMARY.ordinal()) {
        addPrimaryAssignment(hri, favoredServerList[i]);
      }
      if (i == SECONDARY.ordinal()) {
        addSecondaryAssignment(hri, favoredServerList[i]);
      }
      if (i == TERTIARY.ordinal()) {
        addTeritiaryAssignment(hri, favoredServerList[i]);
      }
    }
  }
the existing assignment plan in the hbase:meta region
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/SnapshotOfRegionAssignmentFromMeta.java