private static CompactionResponse requestCompaction(CompactionInfo ci, String runAs, String hostname,
      TxnStore txnHandler) throws MetaException {
    CompactionRequest compactionRequest = new CompactionRequest(ci.dbname, ci.tableName, ci.type);
    if (ci.partName != null)
      compactionRequest.setPartitionname(ci.partName);
    compactionRequest.setRunas(runAs);
    if (StringUtils.isEmpty(ci.initiatorId)) {
      compactionRequest.setInitiatorId(hostname + "-" + Thread.currentThread().getId());
    } else {
      compactionRequest.setInitiatorId(ci.initiatorId);
    }
    compactionRequest.setInitiatorVersion(ci.initiatorVersion);
    compactionRequest.setPoolName(ci.poolName);
    compactionRequest.setOrderByClause(ci.orderByClause);
    LOG.info("Requesting compaction: " + compactionRequest);
    CompactionResponse resp = txnHandler.compact(compactionRequest);
    if (resp.isAccepted()) {
      ci.id = resp.getId();
    }
    return resp;
  }
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