Search in sources :

Example 16 with GetProjectionsSpec

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

the class TestGetPartitionsUsingProjectionAndFilterSpecs method runWithInvalidFilterByNames.

private void runWithInvalidFilterByNames() throws TException {
    GetPartitionsRequest request = getGetPartitionsRequest();
    GetProjectionsSpec projectSpec = request.getProjectionSpec();
    projectSpec.setFieldList(Arrays.asList("sd.location"));
    request.getFilterSpec().setFilterMode(PartitionFilterMode.BY_NAMES);
    // filter mode is set but not filters are provided
    client.getPartitionsWithSpecs(request);
}
Also used : GetProjectionsSpec(org.apache.hadoop.hive.metastore.api.GetProjectionsSpec) GetPartitionsRequest(org.apache.hadoop.hive.metastore.api.GetPartitionsRequest)

Aggregations

GetPartitionsRequest (org.apache.hadoop.hive.metastore.api.GetPartitionsRequest)16 GetProjectionsSpec (org.apache.hadoop.hive.metastore.api.GetProjectionsSpec)16 GetPartitionsResponse (org.apache.hadoop.hive.metastore.api.GetPartitionsResponse)13 PartitionSpecWithSharedSD (org.apache.hadoop.hive.metastore.api.PartitionSpecWithSharedSD)13 Test (org.junit.Test)10 MetastoreCheckinTest (org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest)9 PartitionWithoutSD (org.apache.hadoop.hive.metastore.api.PartitionWithoutSD)8 StorageDescriptor (org.apache.hadoop.hive.metastore.api.StorageDescriptor)7 Partition (org.apache.hadoop.hive.metastore.api.Partition)5 PartitionSpec (org.apache.hadoop.hive.metastore.api.PartitionSpec)4 PartitionListComposingSpec (org.apache.hadoop.hive.metastore.api.PartitionListComposingSpec)3 FieldSchema (org.apache.hadoop.hive.metastore.api.FieldSchema)2 GetPartitionsFilterSpec (org.apache.hadoop.hive.metastore.api.GetPartitionsFilterSpec)2 IOException (java.io.IOException)1 SQLException (java.sql.SQLException)1 ConfigValSecurityException (org.apache.hadoop.hive.metastore.api.ConfigValSecurityException)1 InvalidObjectException (org.apache.hadoop.hive.metastore.api.InvalidObjectException)1 InvalidOperationException (org.apache.hadoop.hive.metastore.api.InvalidOperationException)1 MetaException (org.apache.hadoop.hive.metastore.api.MetaException)1 NoSuchObjectException (org.apache.hadoop.hive.metastore.api.NoSuchObjectException)1