code: public void clearAndReport() {
      synchronized (metrics) {
        for (Codec codec : Codec.getCodecs()) {
          String id = codec.id;
          int extra = 0;
          Map<Integer, MetricsLongValue> codecStatsMap =
            metrics.codecToMisplacedBlocks.get(id);
          // Reset the values.
          for (Entry<Integer, MetricsLongValue> e: codecStatsMap.entrySet()) {
            e.getValue().set(0);
          }
          for (Entry<Integer, Long> e : blockHistograms.get(id).entrySet()) {
            if (e.getKey() < RaidNodeMetrics.MAX_MONITORED_MISPLACED_BLOCKS - 1) {
              MetricsLongValue v = codecStatsMap.get(e.getKey());
              v.set(e.getValue());
            } else {
              extra += e.getValue();
            }
          }
          MetricsLongValue v = codecStatsMap.get(
              RaidNodeMetrics.MAX_MONITORED_MISPLACED_BLOCKS - 1);
          v.set(extra);
        }
      }
      lastBlockHistograms = blockHistograms;
      lastBlockHistogramsPerRack = blockHistogramsPerRack;
      lastUpdateFinishTime = RaidNode.now();
      lastUpdateUsedTime = lastUpdateFinishTime - lastUpdateStartTime;
      LOG.info("Reporting metrices:\n" + toString());
      createEmptyHistograms();
    }
docs: Report the placement histogram to {@link RaidNodeMetrics}. This should only
  be called right after a complete parity file traversal is done.