[ 
https://issues.apache.org/jira/browse/SENTRY-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

kalyan kumar kalvagadda updated SENTRY-2430:
--------------------------------------------
    Environment:     (was: {code:java}
// code placeholder
{code})

> Avoid getting the complete partition objects and fetch the location 
> information only.
> -------------------------------------------------------------------------------------
>
>                 Key: SENTRY-2430
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2430
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>            Reporter: kalyan kumar kalvagadda
>            Priority: Major
>
> With the changes added as part of HIVE-20306, HiveMetaStoreClient now exposes 
> new API "
> "getPartitionsWithSpecs" using which sentry can request specific information 
> for partition.
> In simple words sentry could say fetch me the location information for the 
> partitions in given table. Here is simple example on how it can be used.
>  
>  
>  
>  
> {code:java}
>     GetPartitionsRequest request = new GetPartitionsRequest();
>     GetPartitionsProjectSpec projectSpec = new GetPartitionsProjectSpec();
>     projectSpec.setFieldList(Arrays.asList("sd.location"));
>     GetPartitionsFilterSpec filter = new GetPartitionsFilterSpec();
>     filter.setDbName("compdb");
>     filter.setTblName("comptbl");
>     request.setFilterSpec(filter);
>     request.setProjectionSpec(projectSpec);
>     GetPartitionsResponse response;
>     try {
>       response = client.getPartitionsWithSpecs(request);
>     } catch (Exception ex) {
>       ex.printStackTrace();
>       LOG.error("Exception while retrieving partitions", ex);
>       throw ex;
>     }
> {code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to