use of org.apache.hadoop.hive.metastore.api.PartitionValuesRequest in project hive by apache.
the class TestListPartitions method testListPartitionValuesNoDb.
@Test(expected = MetaException.class)
public void testListPartitionValuesNoDb() throws Exception {
client.dropDatabase(DB_NAME);
List<FieldSchema> partitionSchema = Lists.newArrayList(new FieldSchema("yyyy", "string", ""), new FieldSchema("mm", "string", ""));
PartitionValuesRequest request = new PartitionValuesRequest(DB_NAME, TABLE_NAME, partitionSchema);
client.listPartitionValues(request);
}
use of org.apache.hadoop.hive.metastore.api.PartitionValuesRequest in project hive by apache.
the class TestListPartitions method testListPartitionValuesNullDbName.
@Test
public void testListPartitionValuesNullDbName() throws Exception {
try {
createTable4PartColsParts(client);
List<FieldSchema> partitionSchema = Lists.newArrayList(new FieldSchema("yyyy", "string", ""), new FieldSchema("mm", "string", ""));
PartitionValuesRequest request = new PartitionValuesRequest(null, TABLE_NAME, partitionSchema);
client.listPartitionValues(request);
fail("Should have thrown exception");
} catch (NullPointerException | TProtocolException e) {
// TODO: should not throw different exceptions for different HMS deployment types
}
}
use of org.apache.hadoop.hive.metastore.api.PartitionValuesRequest in project hive by apache.
the class TestListPartitions method testListPartitionValuesNoTblName.
@Test(expected = MetaException.class)
public void testListPartitionValuesNoTblName() throws Exception {
createTable4PartColsParts(client);
List<FieldSchema> partitionSchema = Lists.newArrayList(new FieldSchema("yyyy", "string", ""), new FieldSchema("mm", "string", ""));
PartitionValuesRequest request = new PartitionValuesRequest(DB_NAME, "", partitionSchema);
client.listPartitionValues(request);
}
use of org.apache.hadoop.hive.metastore.api.PartitionValuesRequest in project hive by apache.
the class TestListPartitions method testListPartitionValuesNoDbName.
@Test(expected = MetaException.class)
public void testListPartitionValuesNoDbName() throws Exception {
createTable4PartColsParts(client);
List<FieldSchema> partitionSchema = Lists.newArrayList(new FieldSchema("yyyy", "string", ""), new FieldSchema("mm", "string", ""));
PartitionValuesRequest request = new PartitionValuesRequest("", TABLE_NAME, partitionSchema);
client.listPartitionValues(request);
}
Aggregations