Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11250 )

Change subject: IMPALA-7343: Update SentryProxy to use Sentry bulk API
......................................................................


Patch Set 6: Code-Review+1

(1 comment)

Thanks for the refactors! I added a comment about removing a duplication, lgtm 
otherwise.

http://gerrit.cloudera.org:8080/#/c/11250/6/fe/src/main/java/org/apache/impala/util/SentryPolicyService.java
File fe/src/main/java/org/apache/impala/util/SentryPolicyService.java:

http://gerrit.cloudera.org:8080/#/c/11250/6/fe/src/main/java/org/apache/impala/util/SentryPolicyService.java@460
PS6, Line 460:         if (type == TPrincipalType.ROLE) {
             :           throw new 
AuthorizationException(String.format(ACCESS_DENIED_ERROR_MSG,
             :               requestingUser.getName(), 
"LIST_ALL_ROLES_PRIVILEGES"));
             :         } else {
             :           throw new 
AuthorizationException(String.format(ACCESS_DENIED_ERROR_MSG,
             :               requestingUser.getName(), 
"LIST_ALL_USERS_PRIVILEGES"));
             :         }
nit: can you merge these even more? e.g, add
String function_name = type == TPrincipalType.ROLE ? 
"LIST_ALL_ROLES_PRIVILEGES" : "LIST_ALL_USERS_PRIVILEGES";

Something similar could be done for the other exception too.



--
To view, visit http://gerrit.cloudera.org:8080/11250
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3ab215f2a5c5111bf1d25eec7fac90506d2f6304
Gerrit-Change-Number: 11250
Gerrit-PatchSet: 6
Gerrit-Owner: Fredy Wijaya <[email protected]>
Gerrit-Reviewer: Adam Holley <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Fredy Wijaya <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Vuk Ercegovac <[email protected]>
Gerrit-Comment-Date: Fri, 17 Aug 2018 17:08:45 +0000
Gerrit-HasComments: Yes

Reply via email to