ptnCols.add(new HCatFieldSchema(partitionCol, Type.STRING, null));
}
// Remove this once NotificationListener is fixed and available in HCat snapshot
Map<String, String> tblProps = new HashMap<String, String>();
tblProps.put(HCatConstants.HCAT_MSGBUS_TOPIC_NAME, "hcat." + db + "." + table);
HCatCreateTableDesc tableDesc = HCatCreateTableDesc.create(db, table, cols).fileFormat("textfile")
.partCols(ptnCols).tblProps(tblProps ).build();
hcatClient.createTable(tableDesc);
List<String> tables = hcatClient.listTableNamesByPattern(db, "*");
assertTrue(tables.contains(table));
}