> On June 15, 2018, 10:46 p.m., Sergio Pena wrote: > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryAccessController.java > > Lines 276 (patched) > > <https://reviews.apache.org/r/67134/diff/7/?file=2041080#file2041080line276> > > > > This error will be displayed on the Hive console. Should we write a > > better message?
Ok. I will make that change > On June 15, 2018, 10:46 p.m., Sergio Pena wrote: > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryAccessController.java > > Lines 281-285 (patched) > > <https://reviews.apache.org/r/67134/diff/7/?file=2041080#file2041080line281> > > > > You can pass the returned List<> from getAuthzHierarchy to the Set > > constructor and it will copy the items for you. > > > > See this example: > > > > List<Integer> sourceList = Lists.newArrayList(0, 1, 2, 3, 4, 5); > > Set<Integer> targetSet = Sets.newHashSet(sourceList); Works. Thanks > On June 15, 2018, 10:46 p.m., Sergio Pena wrote: > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryAccessController.java > > Lines 288-289 (patched) > > <https://reviews.apache.org/r/67134/diff/7/?file=2041080#file2041080line288> > > > > You can use a singleton instead of creating a new hash set everytime. > > > > Set<String> users = Collections.singleton(authenticator.getUserName()); Works. Thanks > On June 15, 2018, 10:46 p.m., Sergio Pena wrote: > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryAccessController.java > > Lines 297 (patched) > > <https://reviews.apache.org/r/67134/diff/7/?file=2041080#file2041080line297> > > > > This error will be displayed on the Hive console. Should we write a > > better message? Ok I will make that change - Arjun ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67134/#review204880 ----------------------------------------------------------- On June 15, 2018, 8:08 p.m., Arjun Mishra wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67134/ > ----------------------------------------------------------- > > (Updated June 15, 2018, 8:08 p.m.) > > > Review request for sentry, kalyan kumar kalvagadda, Na Li, Steve Moist, and > Sergio Pena. > > > Repository: sentry > > > Description > ------- > > Currently Sentry doesn't support Hive command to show privileges on > authorizables without mentioning any role or user name > > > Diffs > ----- > > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/SentryHiveAuthorizationTaskFactoryImpl.java > 23246c903 > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryAccessController.java > f0b4b4466 > > sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestSentryHiveAuthorizationTaskFactory.java > 2e3fd7f36 > > sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClient.java > 6f38ed20d > > sentry-service/sentry-service-api/src/main/java/org/apache/sentry/api/service/thrift/SentryPolicyServiceClientDefaultImpl.java > 45dce0e7c > > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestShowGrants.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/67134/diff/7/ > > > Testing > ------- > > $ mvn -f sentry-binding/pom.xml test > $ mvn -f sentry-provider/pom.xml test > > > Thanks, > > Arjun Mishra > >