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.
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.
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.