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.
-
Find the fully qualified domain name or IP address of Hive metastore by
navigating to and looking through the list of roles to find
Hive
Metastore Server
.
-
Navigate to the metastore host configuration in , and search for
javax.jdo.option.ConnectionURL
.
-
In Value, specify the database connection string using the following
syntax:
<connection protocol>://<metastore host>/<metastore
database>?createDatabaseIfNotExist=true
-
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.
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>(your driver name)</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>mypassword</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>false</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoStartMechanism</name>
<value>SchemaTable</value>
</property>
<property>
<name>hive.metastore.schema.verification</name>
<value>true</value>
</property>