private boolean isMergeCompaction(HiveConf conf, AcidDirectory directory,
                                   StorageDescriptor storageDescriptor) {
    return HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_MERGE_COMPACTION_ENABLED)
            && storageDescriptor.getOutputFormat().equalsIgnoreCase("org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat")
            && !hasDeleteOrAbortedDirectories(directory);
  }
Returns whether merge compaction must be enabled or not.
@param conf Hive configuration
@param directory the directory to be scanned
@param storageDescriptor storage descriptor of the underlying table
@return true, if merge compaction must be enabled
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MergeCompactor.java