use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestAlterPartitions method testAlterPartitionsWithEnvironmentCtxMissingPartitionVals.
@Test(expected = MetaException.class)
public void testAlterPartitionsWithEnvironmentCtxMissingPartitionVals() throws Exception {
createTable4PartColsParts(client);
Table t = client.getTable(DB_NAME, TABLE_NAME);
PartitionBuilder builder = new PartitionBuilder();
Partition part = builder.inTable(t).build(metaStore.getConf());
Partition part1 = client.listPartitions(DB_NAME, TABLE_NAME, (short) -1).get(0);
client.alter_partitions(DB_NAME, TABLE_NAME, Lists.newArrayList(part, part1), new EnvironmentContext());
}
use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestAlterPartitions method testAlterPartitionMissingPartitionVals.
@Test(expected = MetaException.class)
public void testAlterPartitionMissingPartitionVals() throws Exception {
createTable4PartColsParts(client);
Table t = client.getTable(DB_NAME, TABLE_NAME);
PartitionBuilder builder = new PartitionBuilder();
Partition part = builder.inTable(t).build(metaStore.getConf());
client.alter_partition(DB_NAME, TABLE_NAME, part);
}
use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestAlterPartitions method testAlterPartitionsMissingPartitionVals.
@Test(expected = MetaException.class)
public void testAlterPartitionsMissingPartitionVals() throws Exception {
createTable4PartColsParts(client);
Table t = client.getTable(DB_NAME, TABLE_NAME);
PartitionBuilder builder = new PartitionBuilder();
Partition part = builder.inTable(t).build(metaStore.getConf());
Partition part1 = client.listPartitions(DB_NAME, TABLE_NAME, (short) -1).get(0);
client.alter_partitions(DB_NAME, TABLE_NAME, Lists.newArrayList(part, part1));
}
use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestAlterPartitions method testAlterPartitionUnknownPartition.
@Test(expected = InvalidOperationException.class)
public void testAlterPartitionUnknownPartition() throws Exception {
createTable4PartColsParts(client);
Table t = client.getTable(DB_NAME, TABLE_NAME);
PartitionBuilder builder = new PartitionBuilder();
Partition part = builder.inTable(t).addValue("1111").addValue("11").addValue("11").build(metaStore.getConf());
client.alter_partition(DB_NAME, TABLE_NAME, part);
}
use of org.apache.hadoop.hive.metastore.client.builder.PartitionBuilder in project hive by apache.
the class TestAlterPartitions method testAlterPartitionWithEnvironmentCtxUnknownPartition.
@Test(expected = InvalidOperationException.class)
public void testAlterPartitionWithEnvironmentCtxUnknownPartition() throws Exception {
createTable4PartColsParts(client);
Table t = client.getTable(DB_NAME, TABLE_NAME);
PartitionBuilder builder = new PartitionBuilder();
Partition part = builder.inTable(t).addValue("1111").addValue("11").addValue("11").build(metaStore.getConf());
client.alter_partition(DB_NAME, TABLE_NAME, part, new EnvironmentContext());
}
Aggregations