@Override
  public void generateFavoredNodesForDaughter(List<ServerName> servers, RegionInfo parent,
    RegionInfo regionA, RegionInfo regionB) throws IOException {
    Map<RegionInfo, List<ServerName>> result = new HashMap<>();
    FavoredNodeAssignmentHelper helper = new FavoredNodeAssignmentHelper(servers, rackManager);
    helper.initialize();

    List<ServerName> parentFavoredNodes = fnm.getFavoredNodes(parent);
    if (parentFavoredNodes == null) {
      LOG.debug("Unable to find favored nodes for parent, " + parent
        + " generating new favored nodes for daughter");
      result.put(regionA, helper.generateFavoredNodes(regionA));
      result.put(regionB, helper.generateFavoredNodes(regionB));

    } else {

      // Lets get the primary and secondary from parent for regionA
      Set<ServerName> regionAFN =
        getInheritedFNForDaughter(helper, parentFavoredNodes, PRIMARY, SECONDARY);
      result.put(regionA, Lists.newArrayList(regionAFN));

      // Lets get the primary and tertiary from parent for regionB
      Set<ServerName> regionBFN =
        getInheritedFNForDaughter(helper, parentFavoredNodes, PRIMARY, TERTIARY);
      result.put(regionB, Lists.newArrayList(regionBFN));
    }

    fnm.updateFavoredNodes(result);
  }
Generate Favored Nodes for daughters during region split.
<p/>
If the parent does not have FN, regenerates them for the daughters.
<p/>
If the parent has FN, inherit two FN from parent for each daughter and generate the remaining.
The primary FN for both the daughters should be the same as parent. Inherit the secondary FN
from the parent but keep it different for each daughter. Choose the remaining FN randomly. This
would give us better distribution over a period of time after enough splits.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/FavoredStochasticBalancer.java