private void markFailed(CompactionInfo ci, String errorMessage) {
    if (ci == null) {
      LOG.warn("CompactionInfo client was null. Could not mark failed");
      return;
    }
    if (StringUtils.isNotBlank(errorMessage)) {
      ci.errorMessage = errorMessage;
    }
    if (msc == null) {
      LOG.warn("Metastore client was null. Could not mark failed: {}", ci);
      return;
    }
    try {
      msc.markFailed(CompactionInfo.compactionInfoToStruct(ci));
    } catch (Throwable t) {
      LOG.error("Caught an exception while trying to mark compaction {} as failed: {}", ci, t);
    }
  }
Finds the next compaction and executes it. The main thread might interrupt the execution of this method
in case of timeout.
@param collectGenericStats If true then for both MR and Query based compaction the stats are regenerated
@param collectMrStats If true then for MR compaction the stats are regenerated
@return Returns true, if there was compaction in the queue, and we started working on it.
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java