Configure a Resource-based Service: Hive
How to add a service to Hive.
Usually, the Ranger Hive service definition uses the HiveServer2 (HS2) JDBC driver to
fetch Hive database/table info for resource lookup and testing the connection.
Alternatively, you can configure the service definition to use Hive metastore libraries
connecting to the Hive metastore database directly. This is recommended when it is
difficult to set up HiveServer2 on your cluster, such as when using HDCloud for AWS.
- Under Ambari>Hive>Configs>Advanced, edit Hive properties:
- Add the below properties to custom
ranger-hive-plugin-properties:
ranger.service.config.param.enable.hive.metastore.lookup = true
ranger.service.config.param.hive.site.file.path = /etc/hive/conf/hive-site.xml
- Save and restart required components.
- To test the configuration is successful, create a new Hive service and specify
the
jdbc.url
as "none", then run Test Connection.