if (partitionsAdded.size() > 0) {
try {
// baseCommitter.cleanupJob failed, try to clean up the
// metastore
for (Partition p : partitionsAdded) {
client.dropPartition(tableInfo.getDatabaseName(),
tableInfo.getTableName(), p.getValues());
}
} catch (Exception te) {
// Keep cause as the original exception
throw new HCatException(