private void cleanOlderEvents(int olderThan, Class table, String tableName) {
    final int eventBatchSize = MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.EVENT_CLEAN_MAX_EVENTS);

    final long ageSec = olderThan;
    final Instant now = Instant.now();

    final int tooOld = Math.toIntExact(now.getEpochSecond() - ageSec);

    final Optional<Integer> batchSize = (eventBatchSize > 0) ? Optional.of(eventBatchSize) : Optional.empty();

    final long start = System.nanoTime();
    int deleteCount = doCleanNotificationEvents(tooOld, batchSize, table, tableName);

    if (deleteCount == 0) {
      LOG.info("No {} events found to be cleaned with eventTime < {}", tableName, tooOld);
    } else {
      int batchCount = 0;
      do {
        batchCount = doCleanNotificationEvents(tooOld, batchSize, table, tableName);
        deleteCount += batchCount;
      } while (batchCount > 0);
    }

    final long finish = System.nanoTime();

    LOG.info("Deleted {} {} events older than epoch:{} in {}ms", deleteCount, tableName, tooOld,
            TimeUnit.NANOSECONDS.toMillis(finish - start));
  }
Get partition's column stats

@return Map of column name and its stats
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java