You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "ji chen (Code Review)" <ge...@cloudera.org> on 2023/10/12 02:46:13 UTC

[Impala-ASF-CR] IMPALA-12397: Fix NullPointerException in SHOW ROLES when there are no roles

ji chen has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/20439 )

Change subject: IMPALA-12397: Fix NullPointerException in SHOW ROLES when there are no roles
......................................................................

IMPALA-12397: Fix 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, 115 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/39/20439/5
-- 
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: 5
Gerrit-Owner: ji chen <ji...@163.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>