Support Questions
Find answers, ask questions, and share your expertise

Configuring Hive metastore to use external database

Master Collaborator

Hi guys,

 I am following this documentation to configure hive metastore to use external mysql/postgres database.


I need to add the Host, port, username, password to the configuration.


In the documentation there is a statement 

"This step shows the configuration properties you need to set in hive-site.xml (/usr/lib/hive/conf/hive-site.xml) to configure the metastore service"


I am curious where to edit hive-site.xml. Because under /usr/lib there is no hive directory.

Should I change /etc/hive/conf/hive-site.xml or should I add these properties via ClouderaManager in Configuration using safety valve property?









If you setup using the Cloudera Manager then it's always recommended to do it there.  Those should be common enough that Cloudera Manager has them, you can try search in the left hand side of the configuration page for Hive service, or Hive Metastore role, just type in the property names (jarax.jdo...) to find them.  


The rule of thumb is to try that first, if they are not there then you can put it in the safety valve for advanced properties.


Hope that helps