Search in sources :

Example 16 with PrimaryKeysRequest

use of org.apache.hadoop.hive.metastore.api.PrimaryKeysRequest in project hive by apache.

the class TestPrimaryKey method getNoSuchDb.

@Test
public void getNoSuchDb() throws TException {
    PrimaryKeysRequest rqst = new PrimaryKeysRequest("nosuch", testTables[0].getTableName());
    List<SQLPrimaryKey> pk = client.getPrimaryKeys(rqst);
    Assert.assertTrue(pk.isEmpty());
}
Also used : SQLPrimaryKey(org.apache.hadoop.hive.metastore.api.SQLPrimaryKey) PrimaryKeysRequest(org.apache.hadoop.hive.metastore.api.PrimaryKeysRequest) Test(org.junit.Test) MetastoreCheckinTest(org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest)

Aggregations

PrimaryKeysRequest (org.apache.hadoop.hive.metastore.api.PrimaryKeysRequest)16 SQLPrimaryKey (org.apache.hadoop.hive.metastore.api.SQLPrimaryKey)15 Test (org.junit.Test)13 MetastoreCheckinTest (org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest)9 Table (org.apache.hadoop.hive.metastore.api.Table)8 SQLPrimaryKeyBuilder (org.apache.hadoop.hive.metastore.client.builder.SQLPrimaryKeyBuilder)8 ForeignKeysRequest (org.apache.hadoop.hive.metastore.api.ForeignKeysRequest)3 SQLForeignKey (org.apache.hadoop.hive.metastore.api.SQLForeignKey)3 TableBuilder (org.apache.hadoop.hive.metastore.client.builder.TableBuilder)3 IMetaStoreClient (org.apache.hadoop.hive.metastore.IMetaStoreClient)2 CheckConstraintsRequest (org.apache.hadoop.hive.metastore.api.CheckConstraintsRequest)2 DefaultConstraintsRequest (org.apache.hadoop.hive.metastore.api.DefaultConstraintsRequest)2 NotNullConstraintsRequest (org.apache.hadoop.hive.metastore.api.NotNullConstraintsRequest)2 SQLCheckConstraint (org.apache.hadoop.hive.metastore.api.SQLCheckConstraint)2 SQLDefaultConstraint (org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint)2 SQLNotNullConstraint (org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint)2 SQLUniqueConstraint (org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint)2 UniqueConstraintsRequest (org.apache.hadoop.hive.metastore.api.UniqueConstraintsRequest)2 SQLForeignKeyBuilder (org.apache.hadoop.hive.metastore.client.builder.SQLForeignKeyBuilder)2 HiveSQLException (org.apache.hive.service.cli.HiveSQLException)2