use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestListPartitions method addPartition.
private static void addPartition(IMetaStoreClient client, Table table, List<String> values) throws TException {
PartitionBuilder partitionBuilder = new PartitionBuilder().fromTable(table);
values.forEach(val -> partitionBuilder.addValue(val));
client.add_partition(partitionBuilder.build());
}
use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestDropPartitions method createPartition.
private Partition createPartition(String tableName, String location, List<String> values, List<FieldSchema> partCols, Map<String, String> partParams) throws Exception {
Partition partition = new PartitionBuilder().setDbName(DB_NAME).setTableName(tableName).setValues(values).setCols(partCols).setLocation(location).setPartParams(partParams).build();
client.add_partition(partition);
partition = client.getPartition(DB_NAME, tableName, values);
return partition;
}
Aggregations