private Boolean isNoAutoCompactSet(AllocWriteIdEvent allocWriteIdEvent) throws MetaException {
    String catalog = MetaStoreUtils.getDefaultCatalog(getConf());
    String dbName = allocWriteIdEvent.getDbName();
    String tableName = allocWriteIdEvent.getTableName();

    RawStore rawStore;
    if (allocWriteIdEvent.getIHMSHandler() != null) {
      rawStore = allocWriteIdEvent.getIHMSHandler().getMS();
    } else {
      rawStore = HMSHandler.getMSForConf(getConf());
    }
    Map<String, String> dbParameters;
    try {
      dbParameters = rawStore.getDatabase(catalog, dbName).getParameters();
    } catch (NoSuchObjectException e) {
      LOGGER.error("Unable to find database " + dbName + ", " + e.getMessage());
      throw new MetaException(String.valueOf(e));
    }
    Table table = rawStore.getTable(catalog, dbName, tableName);
    // In the case of CTAS, the table is created after write ids are allocated, so we'll skip metrics collection.
    if (table != null) {
      return MetaStoreUtils.isNoAutoCompactSet(dbParameters, table.getParameters());
    }
    return false;
  }
Report metrics of metadata added, deleted by this Hive Metastore.
The listener is only attached when the metrics are enabled.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java