Alex Behm has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9942 )

Change subject: IMPALA-6817: Clean up Impala privilege model
......................................................................


Patch Set 8:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/compat-minicluster-profile-3/java/org/apache/impala/authorization/ImpalaActionFactory.java
File 
fe/src/compat-minicluster-profile-3/java/org/apache/impala/authorization/ImpalaActionFactory.java:

http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/compat-minicluster-profile-3/java/org/apache/impala/authorization/ImpalaActionFactory.java@35
PS8, Line 35:         actions.add(new BitFieldAction(action.getValue(), 
action.getCode()));
There is a small and finite number of BitFieldActions, can we just create 
static ones instead of newing them over and over again? Even better we can make 
ImpalaAction a BitFieldAction directly.


http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/main/java/org/apache/impala/authorization/Privilege.java
File fe/src/main/java/org/apache/impala/authorization/Privilege.java:

http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/main/java/org/apache/impala/authorization/Privilege.java@53
PS8, Line 53:   public enum ImpalaAction implements Action {
Why would we not make this ImpalaAction a BitFieldAction directly?


http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/main/java/org/apache/impala/authorization/Privilege.java@60
PS8, Line 60:     ALL("*",
Is this somehow changing the meaning of ALL? We generally treat ALL as a 
distinct privilege and not as a shorthand for all the other privileges.

For example, when you grant ALL, then revoking SELECT is a no-op. You actually 
need to revoke ALL. Whether that behavior makes sense is debatable. The point 
is we should not change the behavior in this patch.


http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/test/java/org/apache/impala/authorization/ImpalaActionFactoryTest.java
File 
fe/src/test/java/org/apache/impala/authorization/ImpalaActionFactoryTest.java:

http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/test/java/org/apache/impala/authorization/ImpalaActionFactoryTest.java@33
PS8, Line 33:     ImpalaActionFactory impala = new ImpalaActionFactory();
factory? (here and elsewhere)


http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/test/java/org/apache/impala/authorization/ImpalaActionFactoryTest.java@52
PS8, Line 52:      expected = Lists.newArrayList(
fix indentation


http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/test/java/org/apache/impala/authorization/ImpalaActionFactoryTest.java@59
PS8, Line 59:          ImpalaAction.ALL);
This makes it look like ALL is a distinct privilege?


http://gerrit.cloudera.org:8080/#/c/9942/8/fe/src/test/java/org/apache/impala/authorization/ImpalaActionFactoryTest.java@71
PS8, Line 71:     assertBitFieldActions(expected, actual);
what happens if you pass in a code 1 << 10 or something invalid?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I65f3f9b4d06f3b03bfa2f484737bb746ec598a6b
Gerrit-Change-Number: 9942
Gerrit-PatchSet: 8
Gerrit-Owner: Fredy Wijaya <fwij...@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com>
Gerrit-Comment-Date: Mon, 09 Apr 2018 22:19:12 +0000
Gerrit-HasComments: Yes

Reply via email to