private Map<HardwareState, Long> calculateDiskInHardStateCount() {
    Map<HardwareState, Long> diskInStateCount = new HashMap<HardwareState, Long>();
    for (HardwareState hardwareState : HardwareState.values()) {
      diskInStateCount.put(hardwareState, new Long(0));
    }
    for (Datacenter datacenter : datacenters) {
      for (DataNode dataNode : datacenter.getDataNodes()) {
        for (Disk disk : dataNode.getDisks()) {
          diskInStateCount.put(disk.getState(), diskInStateCount.get(disk.getState()) + 1);
        }
      }
    }
    return diskInStateCount;
  }
An Ambry hardwareLayout consists of a set of {@link Datacenter}s.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HardwareLayout.java