Hive h = Hive.get(conf);
List<String> cols = new ArrayList<String>();
cols.add("a");
List<String> partCols = new ArrayList<String>();
partCols.add("ds");
h.createTable("foo", cols, partCols, OrcInputFormat.class, OrcOutputFormat.class);
Table t = h.getTable("foo");
Map<String, String> partSpec = new HashMap<String, String>();
partSpec.put("ds", "today");
h.createPartition(t, partSpec);
}