private String updateRMProgressIfLimitExceeds(Progress progress, MessageEncoder encoder) throws SemanticException {
      try {
        String progressJson = new ObjectMapper().writeValueAsString(progress);
        String serializedProgress = encoder.getSerializer().serialize(progressJson);
        if (serializedProgress.length() > ReplStatsTracker.RM_PROGRESS_LENGTH) {
          LOG.warn("Error: RM_PROGRESS limit exceeded.\n" +
                  "RM_PROGRESS: " + progressJson + " overwritten by " + RM_PROGRESS_COLUMN_WIDTH_EXCEEDS_MSG);
          serializedProgress = encoder.getSerializer().serialize(RM_PROGRESS_COLUMN_WIDTH_EXCEEDS_MSG);
        }
        return serializedProgress;
      } catch (Exception e) {
        throw new SemanticException(e);
      }
    }
MetricSink.
Scheduled thread to poll from Metric Collector and persists to DB
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/MetricSink.java