Fredy Wijaya has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14106 )

Change subject: IMPALA-8228: Ownership support for Ranger authz
......................................................................


Patch Set 11: Code-Review+2

(3 comments)

LGTM.

http://gerrit.cloudera.org:8080/#/c/14106/11/fe/src/main/java/org/apache/impala/authorization/Authorizable.java
File fe/src/main/java/org/apache/impala/authorization/Authorizable.java:

http://gerrit.cloudera.org:8080/#/c/14106/11/fe/src/main/java/org/apache/impala/authorization/Authorizable.java@65
PS11, Line 65:     int ownerHash = getOwnerUser() == null ? 0 : 
getOwnerUser().hashCode();
             :     int nameHash = getName().hashCode();
             :     return nameHash * 31 + ownerHash;
nit: You can use Objects.hash(nameHash, ownerHash)


http://gerrit.cloudera.org:8080/#/c/14106/11/fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
File 
fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java:

http://gerrit.cloudera.org:8080/#/c/14106/11/fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java@3068
PS11, Line 3068: <AuthzTest, String>
nit: I think Java 8 can infer this without explicitly specifying the type 
parameters.


http://gerrit.cloudera.org:8080/#/c/14106/11/fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java@3069
PS11, Line 3069:         .put(authorize("select count(*) from 
functional.alltypes"),
               :             selectError("functional.alltypes"))
               :         .put(authorize("select id from functional.alltypes"),
               :             selectError("functional.alltypes"))
               :         .put(authorize("select id from 
functional.alltypes_view"),
               :             selectError("functional.alltypes_view"))
               :         .put(authorize("show create table 
functional.alltypes"),
               :             accessError("functional.alltypes"))
               :         .put(authorize("describe functional.alltypes"),
               :             accessError("functional.alltypes"))
               :         .put(authorize("show create table 
functional.alltypes_view"),
               :             accessError("functional.alltypes_view"))
               :         .put(authorize("describe functional.alltypes_view"),
               :             accessError("functional.alltypes_view"))
               :         .put(authorize("describe 
functional.allcomplextypes.int_struct_col"),
               :             accessError("functional.allcomplextypes"))
               :         .put(authorize("refresh functional.alltypes"),
               :             refreshError("functional.alltypes"))
               :         .put(authorize("invalidate metadata 
functional.alltypes"),
               :             refreshError("functional.alltypes"))
               :         .put(authorize("compute stats functional.alltypes"),
               :             alterError("functional.alltypes"))
               :         .put(authorize("drop stats functional.alltypes"),
               :             alterError("functional.alltypes"))
               :         .put(authorize("create table functional.test_tbl(a 
int)"),
               :             createError("functional"))
               :         .put(authorize("create table functional.test_tbl like 
functional.alltypes"),
               :             accessError("functional.alltypes"))
               :         .put(authorize("create table functional.test_tbl as 
select 1"),
               :             createError("functional"))
               :         .put(authorize("create view functional.test_view as 
select 1"),
               :             createError("functional"))
               :         .put(authorize("alter table functional.alltypes add 
column c1 int"),
               :             alterError("functional"))
               :         .put(authorize("drop table functional.alltypes"),
               :             dropError("functional"))
               :         .put(authorize("drop view functional.alltypes_view"),
               :             dropError("functional"))
               :         .put(authorize("alter view functional.alltypes_view as 
select 1"),
               :             alterError("functional.alltypes_view"))
               :         .put(authorize("alter database functional set owner 
user foo"),
               :             accessError(true, "functional"))
               :         .build();
nit: should be indented.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I737b7164a3e7afb9996b3402e6872effd663f7b4
Gerrit-Change-Number: 14106
Gerrit-PatchSet: 11
Gerrit-Owner: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Austin Nobis <ano...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fre...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Comment-Date: Thu, 12 Sep 2019 04:03:21 +0000
Gerrit-HasComments: Yes

Reply via email to