private void createTable(String dbName, String tblName, boolean isPartitioned, boolean isBucketed,
        boolean insertOnly, String fileFormat, Map<String, String> additionalTblProperties) throws Exception {
      if (dbName != null) {
        tblName = dbName + "." + tblName;
      }
      dropTables(driver, tblName);
      
      StringBuilder query = new StringBuilder();
      query.append("create table ").append(tblName).append(" (a string, b int)");
      if (isPartitioned) {
        query.append(" partitioned by (ds string)");
      }
      if (isBucketed) {
        query.append(" clustered by (a) into 2 buckets");
      }
      query.append(" stored as ").append(fileFormat);
      query.append(" TBLPROPERTIES('transactional'='true',");
      if (additionalTblProperties != null) {
        for (Map.Entry<String, String> e : additionalTblProperties.entrySet()) {
          query.append("'").append(e.getKey()).append("'='").append(e.getValue()).append("', ");
        }
      }
      if (insertOnly) {
        query.append(" 'transactional_properties'='insert_only')");
      } else {
        query.append(" 'transactional_properties'='default')");
      }
      executeStatementOnDriver(query.toString(), driver);
    }
Verify that the expected number of compactions have run, and their state is "succeeded".

@param expectedSuccessfulCompactions number of compactions already run
@throws MetaException
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorOnTezTest.java