Community Articles
Find and share helpful community-sourced technical articles
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

This article just gives an example of how grant/revoke works when hive plugin is enabled with Ranger.

Doc reference -

A user who is admin in Ranger, can manage access to hive tables via grant/revoke operation.

In Ranger UI -> Settings -> Users and Groups -> Users

User “hive” is in Role “Admin” -


On the beeline, login as user hive:

[hive@c141-node5 root]$ beeline -u "jdbc:hive2://,,;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" -n hive

Run the grant command to give select privileges on a table:


In Ranger a new policy is created by that command:


Similarly a revoke run, user mugdha will be removed from the policy:

0: jdbc:hive2://,c14> revoke select on pageviews from user mugdha;
No rows affected (0.169 seconds)
0: jdbc:hive2://,c14>
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
2 of 2
Last update:
‎08-17-2019 05:47 AM
Updated by:
Top Kudoed Authors