Fredy Wijaya has posted comments on this change. ( http://gerrit.cloudera.org:8080/13074 )
Change subject: IMPALA-8280, IMPALA-8281: Add support for show grant user/group with Ranger ...................................................................... Patch Set 8: (2 comments) http://gerrit.cloudera.org:8080/#/c/13074/8//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/13074/8//COMMIT_MSG@13 PS8, Line 13: SHOW GRANT USER/GROUP <id> ON <resource> Instead of <resource> can we list down what the valid resources? http://gerrit.cloudera.org:8080/#/c/13074/8/fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java File fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java: http://gerrit.cloudera.org:8080/#/c/13074/8/fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java@267 PS8, Line 267: if (privilege.getColumn_name() != null || privilege.getTable_name() != null) { : resources.add(RangerCatalogdAuthorizationManager.createColumnResource(privilege)); : } else if (privilege.getUri() != null) { : resources.add(RangerCatalogdAuthorizationManager.createUriResource(privilege)); : } else if (privilege.getDb_name() != null) { : // DB is used by column and function resources. : resources.add(RangerCatalogdAuthorizationManager.createColumnResource(privilege)); : resources.add(RangerCatalogdAuthorizationManager.createFunctionResource(privilege)); : } else { : // Server is used by column, function, and URI resources. : resources.add(RangerCatalogdAuthorizationManager.createColumnResource(privilege)); : resources.add(RangerCatalogdAuthorizationManager.createUriResource(privilege)); : resources.add(RangerCatalogdAuthorizationManager.createFunctionResource(privilege)); : } I feel like we shouldn't be calling functions from RangerCatalogdAuthorizationManager from here. Maybe create a helper class RangerResourceBuilder or something? -- To view, visit http://gerrit.cloudera.org:8080/13074 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic46fb9fc36c9e11ec78d5840d22eb0668150c2a4 Gerrit-Change-Number: 13074 Gerrit-PatchSet: 8 Gerrit-Owner: Austin Nobis <[email protected]> Gerrit-Reviewer: Austin Nobis <[email protected]> Gerrit-Reviewer: Fredy Wijaya <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Comment-Date: Tue, 30 Apr 2019 14:39:56 +0000 Gerrit-HasComments: Yes
