[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 4: Code-Review+1 (5 comments) Sorry for my late review. I just have some minor comments. We can merge this when they are resolved. http://gerrit.cloudera.org:8080/#/c/20439/4//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/20439/4//COMMIT_MSG@7 PS4, Line 7: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles nit: Add "Fix" in the title, i.e. IMPALA-12397: Fix NullPointerException in SHOW ROLES when there are no roles http://gerrit.cloudera.org:8080/#/c/20439/4/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java File fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java: http://gerrit.cloudera.org:8080/#/c/20439/4/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@21 PS4, Line 21: import org.apache.impala.authorization.AuthorizationChecker; nit: unused import http://gerrit.cloudera.org:8080/#/c/20439/4/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@28 PS4, Line 28: import org.apache.ranger.plugin.model.RangerPolicy; nit: unused import http://gerrit.cloudera.org:8080/#/c/20439/4/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@32 PS4, Line 32: import java.util.List; nit: unused import http://gerrit.cloudera.org:8080/#/c/20439/4/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@59 PS4, Line 59: showRolesParams.setGrant_groupIsSet(true); nit: We can remove this. It is a no-op when using 'true'. Code snipper: public void setGrant_groupIsSet(boolean value) { if (!value) { this.grant_group = null; } } -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 4 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Sat, 07 Oct 2023 05:52:36 + Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 4: Code-Review+1 Thanks for addressing my previous comments Ji! I do not have any other suggestion. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 4 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Fri, 08 Sep 2023 18:05:23 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 4: Verified+1 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 4 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Fri, 08 Sep 2023 12:06:21 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 4: Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9689/ DRY_RUN=true -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 4 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Fri, 08 Sep 2023 07:29:44 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 4: Build Successful https://jenkins.impala.io/job/gerrit-code-review-checks/13952/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 4 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Fri, 08 Sep 2023 06:37:16 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
ji chen has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles When there are no roles in Ranger, SHOW ROLES statement hits NullPointerException. The root cause is following statement plugin_.get().getRoles().getRangerRoles(), will return null for latest version of ranger plugin. This issue is not observed in previous version of ranger plugin. This patch will check if null is returned by the method above,if yes, it will return a reference to empty hashset instead. The corresponding unit test and end to end test are added to cover all SHOW ROLE statement cases. Testing: - Pass unit tests. - Pass e2e tests. - Pass core tests with ranger enabled Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f --- M fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java A fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java M tests/authorization/test_ranger.py 3 files changed, 119 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/39/20439/4 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 4 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 3: (4 comments) Thanks for the patch and the new test cases Ji! I only have some very minor comments. http://gerrit.cloudera.org:8080/#/c/20439/3/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java File fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java: http://gerrit.cloudera.org:8080/#/c/20439/3/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@48 PS3, Line 48: showRolesParams.setRequesting_user("admin"); nit: It seems that the value of 'requesting_user' does not have to be "admin" when 'isShowCurrentRole' is true. In RangerImpaladAuthorizationManager#getRoles(), the operation would be considered as non-administrative for the SHOW CURRENT ROLES command. boolean adminOp = !(groups.contains(params.getGrant_group()) || params.is_show_current_roles); if (adminOp) { RangerUtil.validateRangerAdmin(plugin_.get(), params.getRequesting_user()); } http://gerrit.cloudera.org:8080/#/c/20439/3/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@50 PS3, Line 50: } nit: Add a newline after this right curly bracket. http://gerrit.cloudera.org:8080/#/c/20439/3/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@64 PS3, Line 64: used nit: thrown http://gerrit.cloudera.org:8080/#/c/20439/3/tests/authorization/test_ranger.py File tests/authorization/test_ranger.py: http://gerrit.cloudera.org:8080/#/c/20439/3/tests/authorization/test_ranger.py@2304 PS3, Line 2304: reset_ranger=True Thanks! I think this addresses Quanlong's comment at https://gerrit.cloudera.org/c/20439/2/tests/authorization/test_ranger.py#2321. When 'reset_ranger' is True, we reset all the policies in the Ranger service and thus even if there were roles before this test, they will be deleted when this test runs. It may be a good idea to add a code comment stating that since the Ranger policies are reset before this test, we do not have to worry about there could be existing roles when the test is running. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 3 Gerrit-Owner: ji chen Gerrit-Reviewer: Fang-Yu Rao Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Wed, 06 Sep 2023 23:05:10 + Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/20439/3/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/20439/3/fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java@139 PS3, Line 139: EMPTY_ROLES No need to create.a field just for this usage. We can use Collections.emptySet() directly. It actually reuses an internal field for each call. https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#emptySet-- -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 3 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Mon, 04 Sep 2023 13:20:16 + Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 3: Verified+1 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 3 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Thu, 31 Aug 2023 21:25:42 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 3: Build Successful https://jenkins.impala.io/job/gerrit-code-review-checks/13899/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 3 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Thu, 31 Aug 2023 17:22:43 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
ji chen has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles When there are no roles in Ranger, SHOW ROLES statement hits NullPointerException. The root cause is following statement plugin_.get().getRoles().getRangerRoles(), will return null for latest version of ranger plugin. This issue is not observed in previous version of ranger plugin. This patch will check if null is returned by the method above,if yes, it will return a reference to empty hashset instead. The corresponding unit test and end to end test are added to cover all SHOW ROLE statement cases. Testing: - Pass unit tests. - Pass e2e tests. - Pass core tests with ranger enabled Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f --- M fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java A fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java M tests/authorization/test_ranger.py 3 files changed, 111 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/39/20439/3 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 3 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 3: Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9664/ DRY_RUN=true -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 3 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Thu, 31 Aug 2023 16:59:07 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 2: Verified+1 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 2 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Thu, 31 Aug 2023 05:55:21 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 2: (4 comments) http://gerrit.cloudera.org:8080/#/c/20439/2/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/20439/2/fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java@141 PS2, Line 141: } catch (NullPointerException ex) { It's not a best practise to catch NullPointerException. We can check whether 'roles' is null here, and set roleNames to an empty set if 'roles' is null. http://gerrit.cloudera.org:8080/#/c/20439/2/fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java@142 PS2, Line 142: EMPTY_ROLES nit: use Collections.emptySet() directly. http://gerrit.cloudera.org:8080/#/c/20439/2/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java File fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java: http://gerrit.cloudera.org:8080/#/c/20439/2/fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java@46 PS2, Line 46: } nit: add a blank line after this http://gerrit.cloudera.org:8080/#/c/20439/2/tests/authorization/test_ranger.py File tests/authorization/test_ranger.py: http://gerrit.cloudera.org:8080/#/c/20439/2/tests/authorization/test_ranger.py@2318 PS2, Line 2318: for statement in show_roles_statements: : result = self.execute_query_expect_success(admin_client, statement, : user=ADMIN) : print("{0}=>{1}\n".format(statement, result)) We use 2 spaces indent. Please check the result instead of just printing it. for statement in show_roles_statements: result = self.execute_query_expect_success( admin_client, statement, user=ADMIN) assert len(result.data) == 0 BTW, I'm not sure if other tests will create roles. If so, we need to make sure they drop the roles at the end. So in this test we can see no roles there. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 2 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Quanlong Huang Gerrit-Comment-Date: Thu, 31 Aug 2023 02:25:17 + Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 2: Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9659/ DRY_RUN=true -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 2 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Thu, 31 Aug 2023 01:40:59 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 2: Build Successful https://jenkins.impala.io/job/gerrit-code-review-checks/13888/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 2 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Wed, 30 Aug 2023 16:12:20 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 1: Verified+1 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 1 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Wed, 30 Aug 2023 15:52:23 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
ji chen has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles When there are no roles in Ranger, SHOW ROLES statement hits NullPointerException. The root cause is following statement plugin_.get().getRoles().getRangerRoles(), will return null for latest version of ranger plugin, the issue is not observed in previous version of ranger plugin. This patch will catch the NullPointerException if the exception occurs, it will return a reference to empty hashset. the corresponding unit test and end to end test are added to cover all SHOW ROLE statement cases. Testing: - Pass unit tests. - Pass e2e tests. - Pass core tests with ranger enabled Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f --- M fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java A fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java M tests/authorization/test_ranger.py 3 files changed, 111 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/39/20439/2 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 2 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 1: Build Successful https://jenkins.impala.io/job/gerrit-code-review-checks/13884/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests. -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 1 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Wed, 30 Aug 2023 12:05:15 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
ji chen has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20439 Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles When there are no roles in Ranger, SHOW ROLES statement hits NullPointerException. The root cause is following statement plugin_.get().getRoles().getRangerRoles(), will return null for latest version of ranger plugin, the issue is not observed in previous version of ranger plugin. This patch will catch the NullPointerException if the exception occurs, it will return a reference to empty hashset. the corresponding unit test and end to end test are added to cover all SHOW ROLE statement cases. Testing: - Pass unit tests. - Pass e2e tests. - Pass core tests with ranger enabled Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f --- M fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java A fe/src/test/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManagerTest.java M tests/authorization/test_ranger.py 3 files changed, 111 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/39/20439/1 -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 1 Gerrit-Owner: ji chen
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 1: Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/9657/ DRY_RUN=true -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 1 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Wed, 30 Aug 2023 11:41:59 + Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/20439 ) Change subject: IMPALA-12397: NullPointerException in SHOW ROLES when there are no roles .. Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/20439/1/tests/authorization/test_ranger.py File tests/authorization/test_ranger.py: http://gerrit.cloudera.org:8080/#/c/20439/1/tests/authorization/test_ranger.py@2304 PS1, Line 2304: ) flake8: E123 closing bracket does not match indentation of opening bracket's line http://gerrit.cloudera.org:8080/#/c/20439/1/tests/authorization/test_ranger.py@2310 PS1, Line 2310: flake8: W291 trailing whitespace http://gerrit.cloudera.org:8080/#/c/20439/1/tests/authorization/test_ranger.py@2310 PS1, Line 2310: Ensure that no exception should throw for show roles statement line has trailing whitespace http://gerrit.cloudera.org:8080/#/c/20439/1/tests/authorization/test_ranger.py@2320 PS1, Line 2320: , flake8: E501 line too long (91 > 90 characters) -- To view, visit http://gerrit.cloudera.org:8080/20439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 1 Gerrit-Owner: ji chen Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Wed, 30 Aug 2023 11:41:21 + Gerrit-HasComments: Yes