private static Stream<ConfSetup> generateBaseJobConfSetup() {
    List<ConfSetup> inputs = new ArrayList<>();
    String mrProperty = "mapreduce.job.queuename";
    String hiveProperty = "hive.compactor.job.queue";
    String mrDeprecated = "mapred.job.queue.name";
    // Use u1 to u3 values for table properties
    String u1 = "root.user1";
    String u2 = "root.user2";
    String u3 = "root.user3";
    // Use u4 to u6 values for compaction properties
    String u4 = "root.user4";
    String u5 = "root.user5";
    String u6 = "root.user6";
    // Use su1 to su3 for for global properties
    String su1 = "superuser1";
    String su2 = "superuser2";
    String su3 = "superuser3";
    // Check precedence of queue properties when set per table
    // CREATE TABLE ... TBLPROPERTIES (...)
    inputs.add(new ConfSetup()
        .tableProperty(mrDeprecated, u1)
        .tableProperty(mrProperty, u2)
        .tableProperty(hiveProperty, u3)
        .setExpectedQueue(u3));
    inputs.add(new ConfSetup().tableProperty(mrDeprecated, u1).tableProperty(hiveProperty, u3).setExpectedQueue(u3));
    inputs.add(new ConfSetup().tableProperty(mrProperty, u2).tableProperty(hiveProperty, u3).setExpectedQueue(u3));
    inputs.add(new ConfSetup().tableProperty(mrDeprecated, u1).tableProperty(mrProperty, u2).setExpectedQueue(u2));
    inputs.add(new ConfSetup().tableProperty(mrDeprecated, u1).setExpectedQueue(u1));
    inputs.add(new ConfSetup().tableProperty(mrProperty, u2).setExpectedQueue(u2));
    inputs.add(new ConfSetup().tableProperty(hiveProperty, u3).setExpectedQueue(u3));
    // Check precedence of queue properties when set per compaction request
    // ALTER TABLE ... COMPACT ... TBLPROPERTIES (...)
    inputs.add(new ConfSetup()
        .compactionProperty(mrDeprecated, u4)
        .compactionProperty(mrProperty, u5)
        .compactionProperty(hiveProperty, u6)
        .setExpectedQueue(u6));
    inputs.add(new ConfSetup()
        .compactionProperty(mrDeprecated, u4)
        .compactionProperty(hiveProperty, u6)
        .setExpectedQueue(u6));
    inputs.add(new ConfSetup()
        .compactionProperty(mrProperty, u5)
        .compactionProperty(hiveProperty, u6)
        .setExpectedQueue(u6));
    inputs.add(new ConfSetup()
        .compactionProperty(mrDeprecated, u4)
        .compactionProperty(mrProperty, u5)
        .setExpectedQueue(u5));
    inputs.add(new ConfSetup().compactionProperty(mrDeprecated, u4).setExpectedQueue(u4));
    inputs.add(new ConfSetup().compactionProperty(mrProperty, u5).setExpectedQueue(u5));
    inputs.add(new ConfSetup().compactionProperty(hiveProperty, u6).setExpectedQueue(u6));
    // Check precedence of queue properties when set globally
    inputs.add(new ConfSetup().globalProperty(hiveProperty, su1).setExpectedQueue(su1));
    inputs.add(new ConfSetup().globalProperty(mrProperty, su2).setExpectedQueue(su2));
    inputs.add(new ConfSetup().globalProperty(mrDeprecated, su3).setExpectedQueue(su3));
    inputs.add(new ConfSetup()
        .globalProperty(hiveProperty, su1)
        .globalProperty(mrProperty, su2)
        .globalProperty(mrDeprecated, su3)
        .setExpectedQueue(su1));
    inputs.add(new ConfSetup()
        .globalProperty(mrProperty, su2)
        .globalProperty(mrDeprecated, su3)
        .setExpectedQueue(su2));
    inputs.add(new ConfSetup()
        .globalProperty(hiveProperty, su1)
        .globalProperty(mrDeprecated, su3)
        .setExpectedQueue(su1));
    inputs.add(new ConfSetup().globalProperty(hiveProperty, su1).globalProperty(mrProperty, su2).setExpectedQueue(su1));
    // Check precedence of queue properties when set per table, per compaction request, globally. The expected order is:
    // i)   compaction request, 
    // ii)  table properties, 
    // iii) global conf
    inputs.add(new ConfSetup()
        .tableProperty(hiveProperty, u3)
        .compactionProperty(hiveProperty, u6)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u6));
    inputs.add(new ConfSetup()
        .tableProperty(hiveProperty, u3)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u3));
    inputs.add(new ConfSetup()
        .compactionProperty(hiveProperty, u6)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u6));
    inputs.add(new ConfSetup()
        .tableProperty(hiveProperty, u3)
        .compactionProperty(hiveProperty, u6)
        .setExpectedQueue(u6));
    // Check combination of MR properties at table/compaction level and Hive property globally.
    inputs.add(new ConfSetup()
        .tableProperty(mrProperty, u2)
        .compactionProperty(mrProperty, u5)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u5));
    inputs.add(new ConfSetup()
        .tableProperty(mrDeprecated, u1)
        .compactionProperty(mrDeprecated, u4)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u4));
    inputs.add(new ConfSetup()
        .tableProperty(mrProperty, u2)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u2));
    inputs.add(new ConfSetup()
        .tableProperty(mrDeprecated, u1)
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u1));
    // Check empty properties are ignored
    inputs.add(new ConfSetup()
        .tableProperty(hiveProperty, u3)
        .compactionProperty(hiveProperty, "")
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(u3));
    inputs.add(new ConfSetup()
        .tableProperty(hiveProperty, "")
        .compactionProperty(hiveProperty, "")
        .globalProperty(hiveProperty, su1)
        .setExpectedQueue(su1));
    inputs.add(new ConfSetup()
        .tableProperty(hiveProperty, "")
        .compactionProperty(hiveProperty, "")
        .globalProperty(hiveProperty, "")
        .setExpectedQueue("default"));
    return inputs.stream();
  }
Tests for {@link MRCompactor#createBaseJobConf(HiveConf, String, Table, StorageDescriptor, ValidWriteIdList, CompactionInfo)}.
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestMRCompactorJobQueueConfiguration.java