private static ValidWriteIdList resolveValidWriteIds(Table t, TxnStore txnHandler, HiveConf conf)
      throws NoSuchTxnException, MetaException {
    ValidTxnList validTxnList = ValidReadTxnList.fromValue(conf.get(ValidTxnList.VALID_TXNS_KEY));
    // The response will have one entry per table and hence we get only one ValidWriteIdList
    String fullTableName = TxnUtils.getFullTableName(t.getDbName(), t.getTableName());
    GetValidWriteIdsRequest validWriteIdsRequest =
        new GetValidWriteIdsRequest(Collections.singletonList(fullTableName));
    validWriteIdsRequest.setValidTxnList(validTxnList.writeToString());

    return TxnUtils.createValidCompactWriteIdList(
        txnHandler.getValidWriteIds(validWriteIdsRequest).getTblValidWriteIds().get(0));
  }
Check for that special case when minor compaction is supported or not.
<ul>
  <li>The table is Insert-only OR</li>
  <li>Query based compaction is not enabled OR</li>
  <li>The table has only acid data in it.</li>
</ul>
@param tblProperties The properties of the table to check
@param dir The {@link AcidDirectory} instance pointing to the table's folder on the filesystem.
@return Returns true if minor compaction is supported based on the given parameters, false otherwise.
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorUtil.java