In CDP Private Cloud Base, you configure Hive and Hive metastore by modifying
hive-site.xml indirectly using the Cloudera Manager Safety Valve
feature. Using hive set key=value on the command line is not supported.
This task assumes the database is running on myhost, the user
account is hiveuser, and the password is mypassword.
Substitute the following connection URLs and driver names depending on the your database
type.
MySQL connection URL: jdbc:mysql://myhost/metastore
A database for the metastore, such as the default MySQL Server
Hive clients
Minimum Required Role: Configurator (also provided by Cluster Administrator,
Full Administrator)
Find the fully qualified domain name or IP address of Hive metastore by
navigating to Cloudera Manager > Hosts > Role(s) and looking through the list of roles to find Hive Hive
Metastore Server.
Navigate to the metastore host configuration in Clusters > HIVE-1 > Configuration, and search forhive-site.xml.
HIVE-1 is the Hive metastore service.
In Hive Metastore Service Advanced Configuration Snippet
(Safety Valve) for hive-site.xml, click
+, and add the name of the
javax.jdo.option.ConnectionURL property.
In Value, specify the database connection string using the following
syntax: <connection protocol>://<metastore host>/<metastore
database>?createDatabaseIfNotExist=true
For example:
In View as XML, the XML configuration snippet
appears.
Optionally, repeat the previous steps on all hosts in the cluster.
In the same manner,
specify other required connection properties on the metastore host (required),
or on all hosts (optional) as shown in the following example.