Configure a Hive Service
Use the following steps to add a service to Hive:
On the Service Manager page, click the Add icon () next to Hive.
The Create Service page appears.
[D]Enter the following information on the Create Service page:
Table 3.28. Service Details
Field name
Description
Service Name
The name of the service; required when configuring agents.
Description
A description of the service.
Active Status
Enabled or Disabled.
Select Tag Service Select a tag-based service to apply the service and its tag-based policies to Hive. Table 3.29. Config Properties
Field name
Description
Username
The end system username that can be used for connection.
Password
The password for the username entered above.
jdbc.driver ClassName
The full classname of the driver used for Hive connections. Default: org.apache.hive.jdbc.HiveDriver
jdbc.url
The complete connection URL, including port and database name. (Default port: 10000.) For example, on the sandbox, jdbc:hive2://sandbox:10000/.
Common Name For Certificate
The name of the certificate.
This field is interchangeably named Common Name For Certificate and Ranger Plugin SSL CName in Create Service pages.
Add New Configurations
Add any other new configuration(s).
Click
.Click
.
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
[D]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 .
[D]