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

Review Request 67650: SENTRY-2241: Extend the Sync Listener to pass owner information to sentry server.(client side)

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

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 a post listener in HMS. This listener should be extended to get the owner information of tables and databases.


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-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryPlugin.java b5e01e4c21473523b494cc624318b73ec5732408 
  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 
  sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/SentryPolicyStorePlugin.java 52f25dc15d5b6d5e3ef1caa02baec8ed2923e290 


Diff: https://reviews.apache.org/r/67650/diff/1/


Testing
-------


Thanks,

kalyan kumar kalvagadda


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

Posted by Sergio Pena via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
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
> 
>


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

Posted by Sergio Pena via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67650/#review205030
-----------------------------------------------------------


Ship it!




Ship It!

- Sergio Pena


On June 19, 2018, 9:11 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, 9:11 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/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> kalyan kumar kalvagadda
> 
>


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

Posted by kalyan kumar kalvagadda via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67650/
-----------------------------------------------------------

(Updated June 19, 2018, 9:11 p.m.)


Review request for sentry, Na Li and Sergio Pena.


Changes
-------

Addressed review comments.


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 (updated)
-----

  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/4/

Changes: https://reviews.apache.org/r/67650/diff/3-4/


Testing
-------


Thanks,

kalyan kumar kalvagadda


Re: Review Request 67650: SENTRY-2241: Extend the Sync Listener to pass owner information to sentry server.(client side)

Posted by kalyan kumar kalvagadda via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
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 a post listener in HMS. This listener should be extended to get the owner information of tables and databases.


Diffs (updated)
-----

  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-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryPlugin.java b5e01e4c21473523b494cc624318b73ec5732408 
  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 
  sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/SentryPolicyStorePlugin.java 52f25dc15d5b6d5e3ef1caa02baec8ed2923e290 


Diff: https://reviews.apache.org/r/67650/diff/2/

Changes: https://reviews.apache.org/r/67650/diff/1-2/


Testing
-------


Thanks,

kalyan kumar kalvagadda