private static void updateDeltaMetrics(String dbName, String tblName, String partitionName,
      CompactionMetricsData.MetricType type, int numDeltas, int deltasThreshold, TxnStore txnHandler) throws MetaException {
    CompactionMetricsData data = new CompactionMetricsData.Builder()
        .dbName(dbName).tblName(tblName).partitionName(partitionName).metricType(type).metricValue(numDeltas).version(0)
        .threshold(deltasThreshold).build();
    if (!txnHandler.updateCompactionMetricsData(data)) {
      LOG.warn("Compaction metric data cannot be updated because of version mismatch.");
    }
  }
Collect and publish ACID and compaction related metrics.
Everything should be behind 2 feature flags: {@link MetastoreConf.ConfVars#METRICS_ENABLED} and
{@link MetastoreConf.ConfVars#METASTORE_ACIDMETRICS_THREAD_ON}.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/AcidMetricService.java