@Test
  public void testAcidDirCacheOnDropTable() throws Exception {
    int cacheDurationInMinutes = 10;
    AcidUtils.initDirCache(cacheDurationInMinutes);
    HiveConf.setBoolVar(conf, ConfVars.HIVE_COMPACTOR_GATHER_STATS, false);
    String dbName = "default";
    String tblName = "adc_table";

    // First phase, populate the cache
    dropTables(tblName);
    executeStatementOnDriver("create table " + tblName + " (a string) stored as orc " +
            "TBLPROPERTIES ('transactional'='true', 'hive.exec.orc.split.strategy'='BI')", driver);
    executeStatementOnDriver("insert into " + tblName + " values ('a')", driver);
    executeStatementOnDriver("insert into " + tblName + " values ('b')", driver);
    runMajorCompaction(dbName, tblName);
    runCleaner(conf);

    HiveConf.setIntVar(driver.getConf(), ConfVars.HIVE_TXN_ACID_DIR_CACHE_DURATION, cacheDurationInMinutes);
    executeStatementOnDriver("select * from " + tblName + " order by a", driver);

    // Second phase, the previous data should be cleaned
    dropTables(tblName);
    executeStatementOnDriver("create table " + tblName + " (a string) stored as orc " +
            "TBLPROPERTIES ('transactional'='true', 'hive.exec.orc.split.strategy'='BI')", driver);
    executeStatementOnDriver("insert into " + tblName + " values ('c')", driver);
    executeStatementOnDriver("insert into " + tblName + " values ('d')", driver);
    runMajorCompaction(dbName, tblName);
    runCleaner(conf);

    HiveConf.setIntVar(driver.getConf(), ConfVars.HIVE_TXN_ACID_DIR_CACHE_DURATION, cacheDurationInMinutes);
    List<String> rs = execSelectAndDumpData("select * from " + tblName + " order by a", driver, "select");
    Assert.assertEquals(2, rs.size());
    Assert.assertEquals("c", rs.get(0));
    Assert.assertEquals("d", rs.get(1));
  }
Tests compaction of tables that were populated by LOAD DATA INPATH statements.

In this scenario original ORC files are a structured in the following way:
comp3
|--delta_0000001_0000001_0000
   |--000000_0
|--delta_0000002_0000002_0000
   |--000000_0
   |--000001_0

..where comp3 table is not bucketed.

@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java