private Path getOutputDirPath(HiveConf conf, ValidWriteIdList writeIds, boolean isBaseDir,
                                         StorageDescriptor sd) {
    long minOpenWriteId = writeIds.getMinOpenWriteId() == null ? 1 : writeIds.getMinOpenWriteId();
    long highWatermark = writeIds.getHighWatermark();
    long compactorTxnId = Compactor.getCompactorTxnId(conf);
    AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
            .writingBase(isBaseDir).writingDeleteDelta(false)
            .isCompressed(false)
            .minimumWriteId(minOpenWriteId).maximumWriteId(highWatermark)
            .statementId(-1).visibilityTxnId(compactorTxnId);
    return AcidUtils.baseOrDeltaSubdirPath(new Path(sd.getLocation()), options);
  }
Generate output path for compaction. This can be used to generate delta or base directories.
@param conf hive configuration, must be non-null
@param writeIds list of valid write IDs
@param isBaseDir if base directory path should be generated
@param sd the resolved storadge descriptor
@return output path, always non-null
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MergeCompactor.java