[ 
https://issues.apache.org/jira/browse/SENTRY-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16678302#comment-16678302
 ] 

Sergio Peña commented on SENTRY-2430:
-------------------------------------

[~vihangk1] There is a Jira (SENTRY-2443). I started working on it, but I have 
limited time, so you're welcome to take it if you have more time. Just keep in 
mind that we want to keep supporting Hive 2.x as we don't want to break 
compatibility in Sentry 2.x when changing the API to Hive 3.

> 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