Support Questions

Find answers, ask questions, and share your expertise

How to configure HS2 to use external Hive metastore

Expert Contributor


I am trying to configure HS2 (lives in HDP) to use external Hive Metastore (outside HDP).

To achieve this, I updated hive.metastore.uri property to point to external hive metastore thrift end-point. But when I am trying to list tables/database via beeline, unable to see tables/dbs which are on external Metastore.


Master Collaborator

In HDP the recommendation is to use embedded metastore for HiveServer2. That is why Ambari hiveserver2 startup script explicitly passes the following config during startup

/usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris=" " 

To achieve what you are doing, you will need to manually start the hiveserver2 removing the above parameter in the startup command so that it can use the one you set in hive-site.xml or override the hive.metastore.uris to your external metastore in the startup command. Check out the instructions here.

Rising Star

If you want to force ambari to point HS2 to external metastore, the update the following templates on the node where HS2 is running:


You can either clear the cache or update the template in:


- Restart HS2 to point to the external metastore. Just FYI ... the recommended approach is to use the embedded metastore as per this KB Article.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.