Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/24315 )
Change subject: IMPALA-14956: Produce Ranger audit events for GRANT/REVOKE ROLE ...................................................................... Patch Set 6: (3 comments) Left some comments. Will try to address them. http://gerrit.cloudera.org:8080/#/c/24315/6/fe/src/test/java/org/apache/impala/authorization/ranger/RangerCatalogdAuthorizationManagerTest.java File fe/src/test/java/org/apache/impala/authorization/ranger/RangerCatalogdAuthorizationManagerTest.java: http://gerrit.cloudera.org:8080/#/c/24315/6/fe/src/test/java/org/apache/impala/authorization/ranger/RangerCatalogdAuthorizationManagerTest.java@124 PS6, Line 124: grantSqlStmt If we instantiate a GrantRevokeRoleStmt, then we could call its toSql() to produce the SQL statement. http://gerrit.cloudera.org:8080/#/c/24315/6/fe/src/test/java/org/apache/impala/authorization/ranger/RangerCatalogdAuthorizationManagerTest.java@161 PS6, Line 161: String revokeSqlStmt = "revoke role " + role + " from " + revokeeUser; If we instantiate a GrantRevokeRoleStmt, then we could call its toSql() to produce the SQL statement. http://gerrit.cloudera.org:8080/#/c/24315/6/fe/src/test/java/org/apache/impala/authorization/ranger/RangerCatalogdAuthorizationManagerTest.java@201 PS6, Line 201: private static TGrantRevokeRoleParams createGrantRevokeRoleParams(String group, : String user, String role) { : TGrantRevokeRoleParams params = new TGrantRevokeRoleParams(); : if (group != null) { : params.setGroup_names(Arrays.asList(group)); : params.setUser_names(new ArrayList<>()); : } else { : Preconditions.checkArgument(user != null); : params.setGroup_names(new ArrayList<>()); : params.setUser_names(Arrays.asList(user)); : } : params.setRole_names(Arrays.asList(role)); : return params; : } We may be able to re-use the code at https://github.com/apache/impala/blob/18ed94d/fe/src/main/java/org/apache/impala/analysis/GrantRevokeRoleStmt.java#L58-L70 that achieves the same thing, if we could instantiate an instance of GrantRevokeRoleStmt. -- To view, visit http://gerrit.cloudera.org:8080/24315 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7e0527af0532749817ea538c253262a5e2a65c61 Gerrit-Change-Number: 24315 Gerrit-PatchSet: 6 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Comment-Date: Tue, 19 May 2026 23:12:16 +0000 Gerrit-HasComments: Yes
