private ResourceInfo getResourceInfo(String resourceName) {
    String dcName = clusterMapConfig.clusterMapDatacenterName;
    List<String> allInstances = new ArrayList<>(getAllInstancesForResource(resourceName));
    List<String> liveInstances = allInstances.stream()
        .map(instanceNameToAmbryDataNode::get)
        .filter(dn -> dn.getState() == HardwareState.AVAILABLE)
        .map(ClusterMapUtils::getInstanceName)
        .collect(Collectors.toList());
    List<String> unavailableInstances = allInstances.stream()
        .map(instanceNameToAmbryDataNode::get)
        .filter(dn -> dn.getState() == HardwareState.UNAVAILABLE)
        .map(ClusterMapUtils::getInstanceName)
        .collect(Collectors.toList());
    long totalCapacity = getResourceTotalRegisteredHostDiskCapacity(resourceName);
    long liveCapacity = getResourceAvailableRegisteredHostDiskCapacity(resourceName);
    long unavailableCapacity = totalCapacity - liveCapacity;
    int numPartitions = getNumberOfPartitionsInResource(resourceName);
    String tag = dcToResourceNameToTag.get(dcName).get(resourceName);
    int replicationFactor = dcToTagToResourceProperty.get(dcName).get(tag).replicationFactor;
    int numExpectedReplicas = numPartitions * replicationFactor;
    int numCurrentReplicas = getReplicaCountForStateInResource(null, resourceName);
    int expectedTotalReplicaWeight = getResourceExpectedTotalDiskCapacityUsage(resourceName, replicationFactor);
    int currentTotalReplicaWeight = getResourceTotalDiskCapacityUsage(resourceName);
    Map<String, Set<String>> failedDisks = new HashMap<>();
    for (String instanceName : getAllInstancesForResource(resourceName)) {
      Set<AmbryDisk> disks = ambryDataNodeToAmbryDisks.get(instanceNameToAmbryDataNode.get(instanceName));
      Set<String> failedDiskMountPath =
          disks.stream().filter(disk -> disk.getState() == HardwareState.UNAVAILABLE).map(AmbryDisk::getMountPath)
          .collect(Collectors.toSet());
      if (!failedDiskMountPath.isEmpty()) {
        failedDisks.put(instanceName, failedDiskMountPath);
      }
    }
    return new ResourceInfo(resourceName, liveInstances, unavailableInstances, liveCapacity, unavailableCapacity,
        numPartitions, numExpectedReplicas, numCurrentReplicas, expectedTotalReplicaWeight, currentTotalReplicaWeight,
        failedDisks);
  }
Query the list of the resource names identified by the {@link ResourceIdentifier} and return a list of {@link ResourceInfo}.
@param identifier
@return
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixClusterManager.java