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