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

Colin Ma updated SENTRY-565:
----------------------------
    Attachment: SENTRY-565.004.patch

[~sravya], I update the patch on review board according to your comments, using 
SimpleCacheProviderBackend for the cached privilege.
For the current solution, the following things are the key changed:
1. sentry_policy_service.thrift is changed for new api.
2. DBPrivilegeCache implements the PrivilegeCache to deal with the cached 
privilege
3. SimpleCacheProviderBackend will initialize the instance of PrivilegeCache.
4. SentryPolicyServiceClient and SentryPolicyStoreProcessor are updated for the 
new api.

This patch is without the test cases, I'll add test cases if you think the 
solution is ok for the cache privilege.

> Improvement the performance when Sentry filter the entity
> ---------------------------------------------------------
>
>                 Key: SENTRY-565
>                 URL: https://issues.apache.org/jira/browse/SENTRY-565
>             Project: Sentry
>          Issue Type: Improvement
>            Reporter: Colin Ma
>            Assignee: Colin Ma
>         Attachments: SENTRY-565.001.patch, SENTRY-565.002.patch, 
> SENTRY-565.003.patch, SENTRY-565.004.patch
>
>
> Currently, when get the metadata from hive, eg, "show tables", "show 
> databases". Sentry will filter the result and output the authorized entities. 
> There will be many RPC calls when filtering the result. The related code is 
> in HiveAuthzBinding, for example, in filterShowTables:
> {code}
> ......
> for (String tableName : queryResult) {
>   ......
>   hiveAuthzBinding.authorize(operation, tableMetaDataPrivilege, subject, 
> inputHierarchy,
>             outputHierarchy, providedPrivileges);
>   ......
> }
> ......
> {code}
> hiveAuthzBinding.authorize will get the privileges from sentry service, if 
> there are many tables in the hive, the filtering process will spend much 
> time. Considering sentry also need to filter the column, HiveAuthzBinding 
> should be improved to reduce the number of rpc calls when doing the filter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to