@Override
  public void setConf(Configuration configuration) {
    conf = configuration;
    txnHandler = TxnUtils.getTxnStore(conf);
    metricsEnabled = MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.METRICS_ENABLED) &&
        MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.METASTORE_ACIDMETRICS_THREAD_ON);

    try {
      if (metricsEnabled) {
        maxCacheSize = MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.METASTORE_DELTAMETRICS_MAX_CACHE_SIZE);
        initObjectsForMetrics();
      }
    } catch (Exception e) {
      LOG.error("Cannot initialize delta file metrics mbean server. AcidMetricService initialization aborted.", e);
    }
  }
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