private Table createTestTable(boolean transactional) throws HiveException, AlreadyExistsException {
    Database db = new Database();
    db.setName(dbName);
    hive.createDatabase(db, true);

    Table table = new Table(dbName, tableName);
    table.setDbName(dbName);
    if (transactional) {
      table.setInputFormatClass(OrcInputFormat.class);
      table.setOutputFormatClass(OrcOutputFormat.class);
    } else {
      table.setInputFormatClass(TextInputFormat.class);
      table.setOutputFormatClass(HiveIgnoreKeyTextOutputFormat.class);
    }
    table.setPartCols(partCols);
    if (transactional) {
      table.setProperty("transactional", "true");
    }

    hive.createTable(table);
    table = hive.getTable(dbName, tableName);
    Assert.assertTrue(table.getTTable().isSetId());
    table.getTTable().unsetId();

    for (Map<String, String> partSpec : parts) {
      hive.createPartition(table, partSpec);
    }
    return table;
  }
Creates a partition directory structure on file system but with a reverse order
of sub-directories compared to the partition keys defined in the table. Eg. if the
partition keys defined in table are (a int, b int, c int) this method will create
an invalid directory c=val_1/b=val_1/a=val_1
@param table table
@param numPartitions Number of partitions to create
@throws IOException
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java