@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null) {
      return false;
    }
    if (!(o instanceof FavoredNodesPlan)) {
      return false;
    }
    // To compare the map from object o is identical to current assignment map.
    Map<String, List<ServerName>> comparedMap = ((FavoredNodesPlan) o).favoredNodesMap;

    // compare the size
    if (comparedMap.size() != this.favoredNodesMap.size()) {
      return false;
    }

    // compare each element in the assignment map
    for (Map.Entry<String, List<ServerName>> entry : comparedMap.entrySet()) {
      List<ServerName> serverList = this.favoredNodesMap.get(entry.getKey());
      if (serverList == null && entry.getValue() != null) {
        return false;
      } else if (serverList != null && !serverList.equals(entry.getValue())) {
        return false;
      }
    }
    return true;
  }
Return the mapping between each region to its favored region server list.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodesPlan.java