You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Na Li via Review Board <no...@reviews.apache.org> on 2018/08/20 21:44:58 UTC

Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

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

Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.


Bugs: sentry-2356
    https://issues.apache.org/jira/browse/sentry-2356


Repository: sentry


Description
-------

Add function for sentry client to get owner privilege type from sentry server


Diffs
-----

  sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
  sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
  sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
  sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
  sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
  sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
  sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
  sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
  sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
  sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 


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


Testing
-------


Thanks,

Na Li


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

Posted by Na Li via Review Board <no...@reviews.apache.org>.

> On Aug. 21, 2018, 1:15 p.m., kalyan kumar kalvagadda wrote:
> > Lina, Code looks good. General comment. Why don't we add a generic api that can returns requested configuration instead of adding API specifc to one configuration?

We already have a general function SentryPolicyServiceClient.getConfigValue(), which calls SentryPolicyStoreProcessor.get_sentry_config_value. The returned value is String. The new function I added is enum to avoid mistake.


- Na


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


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

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/68433/#review207657
-----------------------------------------------------------



Lina, Code looks good. General comment. Why don't we add a generic api that can returns requested configuration instead of adding API specifc to one configuration?

- kalyan kumar kalvagadda


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

Posted by Sergio Pena via Review Board <no...@reviews.apache.org>.

> On Aug. 21, 2018, 1:34 p.m., Sergio Pena wrote:
> > sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift
> > Lines 469-470 (patched)
> > <https://reviews.apache.org/r/68433/diff/1/?file=2075569#file2075569line469>
> >
> >     I think we should make a generic call to get information from Sentry. This is the first call to get such info and there will be more in the future, so we may end up having several methods for one specific type of information.
> >     
> >     Hive has a similar generic API call to get information. This is called: GetInfo() and accepts a info request as a parameter that include several types of information to get. For Sentry, we can start with a CONFIG_DB_OWNER_PRIVILEGE.
> >     
> >     See https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift#L1258

Perhas use the same config name as the request. CONFIG_DB_POLICY_OWNER_AS_PRIVILEGE


- Sergio


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


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

Posted by Sergio Pena via Review Board <no...@reviews.apache.org>.

> On Aug. 21, 2018, 1:34 p.m., Sergio Pena wrote:
> > sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift
> > Lines 469-470 (patched)
> > <https://reviews.apache.org/r/68433/diff/1/?file=2075569#file2075569line469>
> >
> >     I think we should make a generic call to get information from Sentry. This is the first call to get such info and there will be more in the future, so we may end up having several methods for one specific type of information.
> >     
> >     Hive has a similar generic API call to get information. This is called: GetInfo() and accepts a info request as a parameter that include several types of information to get. For Sentry, we can start with a CONFIG_DB_OWNER_PRIVILEGE.
> >     
> >     See https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift#L1258
> 
> Sergio Pena wrote:
>     Perhas use the same config name as the request. CONFIG_DB_POLICY_OWNER_AS_PRIVILEGE
> 
> Na Li wrote:
>     We already have a general function SentryPolicyServiceClient.getConfigValue(), which calls SentryPolicyStoreProcessor.get_sentry_config_value. The returned value is String. The new function I added is enum to avoid mistake.

I see. I didn't know we had such method. Then I don't see the reason adding a new API just to avoid mistakes. I prefer not to continue on this patch if this API already exists.


- Sergio


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


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

Posted by Na Li via Review Board <no...@reviews.apache.org>.

> On Aug. 21, 2018, 1:34 p.m., Sergio Pena wrote:
> > sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift
> > Lines 469-470 (patched)
> > <https://reviews.apache.org/r/68433/diff/1/?file=2075569#file2075569line469>
> >
> >     I think we should make a generic call to get information from Sentry. This is the first call to get such info and there will be more in the future, so we may end up having several methods for one specific type of information.
> >     
> >     Hive has a similar generic API call to get information. This is called: GetInfo() and accepts a info request as a parameter that include several types of information to get. For Sentry, we can start with a CONFIG_DB_OWNER_PRIVILEGE.
> >     
> >     See https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift#L1258
> 
> Sergio Pena wrote:
>     Perhas use the same config name as the request. CONFIG_DB_POLICY_OWNER_AS_PRIVILEGE

We already have a general function SentryPolicyServiceClient.getConfigValue(), which calls SentryPolicyStoreProcessor.get_sentry_config_value. The returned value is String. The new function I added is enum to avoid mistake.


- Na


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


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

Posted by Na Li via Review Board <no...@reviews.apache.org>.

> On Aug. 21, 2018, 1:34 p.m., Sergio Pena wrote:
> > sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift
> > Lines 469-470 (patched)
> > <https://reviews.apache.org/r/68433/diff/1/?file=2075569#file2075569line469>
> >
> >     I think we should make a generic call to get information from Sentry. This is the first call to get such info and there will be more in the future, so we may end up having several methods for one specific type of information.
> >     
> >     Hive has a similar generic API call to get information. This is called: GetInfo() and accepts a info request as a parameter that include several types of information to get. For Sentry, we can start with a CONFIG_DB_OWNER_PRIVILEGE.
> >     
> >     See https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift#L1258
> 
> Sergio Pena wrote:
>     Perhas use the same config name as the request. CONFIG_DB_POLICY_OWNER_AS_PRIVILEGE
> 
> Na Li wrote:
>     We already have a general function SentryPolicyServiceClient.getConfigValue(), which calls SentryPolicyStoreProcessor.get_sentry_config_value. The returned value is String. The new function I added is enum to avoid mistake.
> 
> Sergio Pena wrote:
>     I see. I didn't know we had such method. Then I don't see the reason adding a new API just to avoid mistakes. I prefer not to continue on this patch if this API already exists.

agree. I closed this issue as not to fix.


- Na


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


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>


Re: Review Request 68433: SENTRY-2356: Sentry Server should provide API for Sentry Client to get Owner Privilege Type

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/68433/#review207660
-----------------------------------------------------------




sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift
Lines 469-470 (patched)
<https://reviews.apache.org/r/68433/#comment291125>

    I think we should make a generic call to get information from Sentry. This is the first call to get such info and there will be more in the future, so we may end up having several methods for one specific type of information.
    
    Hive has a similar generic API call to get information. This is called: GetInfo() and accepts a info request as a parameter that include several types of information to get. For Sentry, we can start with a CONFIG_DB_OWNER_PRIVILEGE.
    
    See https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift#L1258


- Sergio Pena


On Aug. 20, 2018, 9:44 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68433/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 9:44 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2356
>     https://issues.apache.org/jira/browse/sentry-2356
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add function for sentry client to get owner privilege type from sentry server
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/SentryPolicyService.java 0cbd8ab 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeType.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeRequest.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/gen/thrift/gen-javabean/org/apache/sentry/api/service/thrift/TSentryOwnerPrivilegeTypeResponse.java PRE-CREATION 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java 3ef1624 
>   sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java a2213ae 
>   sentry-service/sentry-service-api/src/main/resources/sentry_policy_service.thrift 2e79e56 
>   sentry-service/sentry-service-api/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyServiceClientDefaultImpl.java e2e1e69 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyStoreProcessor.java 36b635a 
>   sentry-service/sentry-service-server/src/test/java/org/apache/sentry/api/service/thrift/TestSentryPolicyStoreProcessor.java 2de6253 
> 
> 
> Diff: https://reviews.apache.org/r/68433/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Na Li
> 
>