Description
Few Hive plugin tests fail with following NPE:
org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException: java.lang.NullPointerException at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.getCurrentRoleNamesFromRanger(RangerHiveAuthorizer.java:359) ~[classes/:?] at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.initUserRoles(RangerHiveAuthorizer.java:320) [classes/:?] at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.getCurrentRoles(RangerHiveAuthorizer.java:329) [classes/:?] at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.filterListCmdObjects(RangerHiveAuthorizer.java:1063) [classes/:?] at org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook.getFilteredObjects(AuthorizationMetaStoreFilterHook.java:81) [hive-exec-3.1.2.jar:3.1.2] at org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook.filterDatabases(AuthorizationMetaStoreFilterHook.java:55) [hive-exec-3.1.2.jar:3.1.2] at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getAllDatabases(HiveMetaStoreClient.java:1356) [hive-exec-3.1.2.jar:3.1.2] at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getAllDatabases(HiveMetaStoreClient.java:1351) [hive-exec-3.1.2.jar:3.1.2] at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source) ~[?:?] ... Caused by: java.lang.NullPointerException at java.util.HashSet.<init>(HashSet.java:119) ~[?:1.8.0_265] at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.getCurrentRoleNamesFromRanger(RangerHiveAuthorizer.java:350) ~[classes/:?]