final HCatClient client = HiveCatalogService.get(metastoreUrl);
Map<String, String> partitionSpec = new HashMap<String, String>();
partitionSpec.put("ds", PARTITION_VALUE);
client.dropPartitions(DATABASE_NAME, TABLE_NAME, partitionSpec, true);
Thread.sleep(1000); // sleep so the next add is delayed a bit
HCatAddPartitionDesc reinstatedPartition = HCatAddPartitionDesc.create(
DATABASE_NAME, TABLE_NAME, null, partitionSpec).build();