Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
ghx-label-9
Description
When there are no roles in Ranger, SHOW ROLES statement hits NullPointerException:
Query: show roles ERROR: InternalException: Error executing SHOW ROLES. Ranger error message: null
The cause is 'roles' here is null:
Set<RangerRole> roles = plugin_.get().getRoles().getRangerRoles(); roleNames = roles.stream().map(RangerRole::getName).collect(Collectors.toSet());
To reproduce this, start Impala cluster with Ranger authorization:
bin/start-impala-cluster.py --impalad_args="--server-name=server1 --ranger_service_type=hive --ranger_app_id=impala --authorization_provider=ranger" --catalogd_args="--server-name=server1 --ranger_service_type=hive --ranger_app_id=impala --authorization_provider=ranger"
At the begining, there are no roles in Ranger. Run "SHOW ROLES" in Impala to reproduce the error.