public static LockRequest createLockRequest(HiveConf conf, CompactionInfo ci, long txnId, 
      LockType lockType, DataOperationType opType) {
    String agentInfo = Thread.currentThread().getName();
    
    LockComponentBuilder lockCompBuilder = new LockComponentBuilder()
      .setLock(lockType)
      .setOperationType(opType)
      .setDbName(ci.dbname)
      .setTableName(ci.tableName)
      .setIsTransactional(true);

    if (ci.partName != null) {
      lockCompBuilder.setPartitionName(ci.partName);
    }
    return new LockRequestBuilder(agentInfo)
      .setTransactionId(txnId)
      .setUser(ci.runAs)
      .setZeroWaitReadEnabled(
          !conf.getBoolVar(HiveConf.ConfVars.TXN_OVERWRITE_X_LOCK)
            || !conf.getBoolVar(HiveConf.ConfVars.TXN_WRITE_X_LOCK))
      .addLockComponent(lockCompBuilder.build())
      .build();
  }
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