long getPartitionReadWriteCount() {
      long count = 0;
      for (AmbryPartition partition : partitionMap.values()) {
        // TODO Efficient_Metadata_Operations_TODO Note that currently even partially read write partitions are treated
        //  as read write once we start making the distinction, we should also change this metric.
        if (partition.getPartitionState() != PartitionState.READ_ONLY) {
          count++;
        }
      }
      return count;
    }
@return the count of partitions in this cluster that are in read-write state.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixClusterManager.java