protected void addDeltaFileWithTxnComponents(Table t, Partition p, int numRecords, boolean abort)
      throws Exception {
    long txnId = openTxn();
    long writeId = ms.allocateTableWriteId(txnId, t.getDbName(), t.getTableName());
    acquireLock(t, p, txnId);
    addDeltaFile(t, p, writeId, writeId, numRecords);
    if (abort) {
      txnHandler.abortTxns(new AbortTxnsRequest(Collections.singletonList(txnId)));
    } else {
      txnHandler.commitTxn(new CommitTxnRequest(txnId));
    }
  }
Super class for all of the compactor test modules.
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java