public void reportStageStart(String stageName, Map<String, Long> metricMap) throws SemanticException {
    if (isEnabled) {
      LOG.debug("Stage Started {}, {}, {}", stageName, metricMap.size(), metricMap );
      Progress progress = replicationMetric.getProgress();
      progress.setStatus(Status.IN_PROGRESS);
      Stage stage = new Stage(stageName, Status.IN_PROGRESS, getCurrentTimeInMillis());
      for (Map.Entry<String, Long> metric : metricMap.entrySet()) {
        stage.addMetric(new Metric(metric.getKey(), metric.getValue()));
      }
      progress.addStage(stage);
      replicationMetric.setProgress(progress);
      metricCollector.addMetric(replicationMetric);
    }
  }
Abstract class for Replication Metric Collection.
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/ReplicationMetricCollector.java