void clearStateTransitionMetric(String partitionName) {
    partitionTransitionToCount.entrySet().removeIf((partitionToMetricCounter -> {
      if (partitionToMetricCounter.getKey().startsWith("State-Transition-Partition-" + partitionName)) {
        registry.remove(MetricRegistry.name(HelixParticipant.class, partitionToMetricCounter.getKey()));
        return true;
      }
      return false;
    }));
  }
Removes all the metric objects created for tracking state transitions
for this partition.
@param partitionName partition name
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixParticipantMetrics.java