You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Sergio Pena via Review Board <no...@reviews.apache.org> on 2018/06/19 20:12:36 UTC

Re: Review Request 67650: SENTRY-2275: Grant and revoke owner privileges based on HMS updates(client-side)

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67650/#review205019
-----------------------------------------------------------




sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryHmsEvent.java
Lines 62-93 (patched)
<https://reviews.apache.org/r/67650/#comment287894>

    Add javadoc comments for these constructors explainig what information is obtained from the events.



sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryHmsEvent.java
Lines 181-190 (patched)
<https://reviews.apache.org/r/67650/#comment287895>

    These two methods can be merged into one. The constructor can get the boolean value initially and just return the boolean value in the isMetastoreTransactionActive.



sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentrySyncHMSNotificationsPostEventListener.java
Lines 300-303 (patched)
<https://reviews.apache.org/r/67650/#comment287896>

    We should not continue with the notification to Sentry if the event is called during a database transaction because we might leave stale privileges in Sentry.


- Sergio Pena


On June 19, 2018, 4:13 p.m., kalyan kumar kalvagadda wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67650/
> -----------------------------------------------------------
> 
> (Updated June 19, 2018, 4:13 p.m.)
> 
> 
> Review request for sentry, Na Li and Sergio Pena.
> 
> 
> Bugs: SENTRY-2241
>     https://issues.apache.org/jira/browse/SENTRY-2241
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Sentry has SentrySyncHMSNotificationsPostEventListener which is added as a post listener in HMS. This listener should be extended to get the owner information of tables and databases.
> 
> Based on these notifications owner privileges are granted/revoked.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryHmsEvent.java PRE-CREATION 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentrySyncHMSNotificationsPostEventListener.java ccb60ff2de16a00046e317d4b48fe37e23f7337e 
>   sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/metastore/TestSentrySyncHMSNotificationsPostEventListener.java fc1c3d513f29bbc9dd2f8a3c6e1eeb4cd3e12e34 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 6f38ed20dcba08ec1d5a4c63fadb0611381d9c98 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java 45dce0e7caedc755c3b1b6515830974a21c11ee5 
> 
> 
> Diff: https://reviews.apache.org/r/67650/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> kalyan kumar kalvagadda
> 
>