Map<String, Integer> getPartitionToResourceId(Map<Integer, IdealState> resourceIdToIdealState) {
    Map<String, Integer> result = new HashMap<>();
    for (Map.Entry<Integer, IdealState> ent : resourceIdToIdealState.entrySet()) {
      Integer resourceId = ent.getKey();
      IdealState resourceIS = ent.getValue();
      resourceIS.getPartitionSet().forEach(p -> result.put(p, resourceId));
    }
    return result;
  }
Return a map from partition to resource id, given the map from resource id to ideal state.
@param resourceIdToIdealState
@return
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java