public void reportStageProgress(String stageName, String metricName, long count) throws SemanticException {
    if (isEnabled) {
      LOG.debug("Stage progress {}, {}, {}", stageName, metricName, count );
      Progress progress = replicationMetric.getProgress();
      Stage stage = progress.getStageByName(stageName);
      Metric metric = stage.getMetricByName(metricName);
      metric.setCurrentCount(metric.getCurrentCount() + count);
      if (metric.getCurrentCount() > metric.getTotalCount()) {
        metric.setTotalCount(metric.getCurrentCount());
      }
      stage.addMetric(metric);
      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