Impala Public Jenkins has submitted this change and it was merged. ( 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 Reviewed-on: http://gerrit.cloudera.org:8080/20439 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- 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(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: Id80fc2c9152a09194718da1b4266c5f804f0971f Gerrit-Change-Number: 20439 Gerrit-PatchSet: 8 Gerrit-Owner: ji chen <jichen0...@163.com> Gerrit-Reviewer: Fang-Yu Rao <fangyu....@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>