public long getPartitionInStateCount(PartitionState partitionState) {
    int count = 0;
    for (Partition partition : partitionMap.values()) {
      if (partition.getPartitionState() == partitionState) {
        count++;
      }
    }
    return count;
  }
Constructor for initial PartitionLayout
@param hardwareLayout the {@link JSONObject} that represents the partition layout
@param clusterMapConfig the {@link ClusterMapConfig} to use.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/PartitionLayout.java