You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Lalwani, Jayesh" <jl...@amazon.com> on 2026/05/04 22:13:53 UTC

[DISCUSS] HIVE-29595: HiveClientCache does not respect metastore.client.impl

Hi all,

HIVE-12679 (fixed in 4.2.0) added support for pluggable IMetaStoreClient viametastore.client.impl through the new HiveMetaStoreClientBuilder. However,HiveClientCache used by HCatalog's HCatInputFormat/HCatOutputFormat was not updated as part of that work. It still hardcodes HiveMetaStoreClient in both getNonCachedHiveMetastoreClient() and CacheableHiveMetaStoreClient extends HiveMetaStoreClient.

This means any custom IMetaStoreClient configured via hive.metastore.client.impl is ignored when accessing Hive tables through HCatalog (e.g., MapReduce jobsusing HCatInputFormat).

I've opened a PR with a fix: https://github.com/apache/hive/pull/6462
JIRA: https://issues.apache.org/jira/browse/HIVE-29595

The change is limited to metastore/src/java/.../HiveClientCache.java:
- getNonCachedHiveMetastoreClient() reads the class name from METASTORE_CLIENT_IMPL instead of hardcoding HiveMetaStoreClient
- CacheableHiveMetaStoreClient refactored to use InvocationHandler/Proxy so it can wrap any IMetaStoreClient implementation- Existing TestHiveClientCache tests pass (5/5)Would appreciate any feedback or review.

Thanks,
Jayesh