[Bug] hive 2.1.1 create catalog error . Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 396
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Paimon version
0.7.0
### Compute Engine
flink 1.14
### Minimal reproduce step
@humengyu2012
use hive 2.1.1 create catalog error .
reason: hive 2.1.1 Version HiveMetaStoreClient Structure method: public HiveMetaStoreClient(HiveConf conf, Boolean allowEmbedded)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.paimon.hive.RetryingMetaStoreClientFactory.createClient(RetryingMetaStoreClientFactory.java:146)
at org.apache.paimon.hive.HiveCatalog.createClient(HiveCatalog.java:600)
at org.apache.paimon.hive.HiveCatalog.(HiveCatalog.java:147)
at org.apache.paimon.hive.HiveCatalog.createHiveCatalog(HiveCatalog.java:692)
at org.apache.paimon.hive.HiveCatalogFactory.create(HiveCatalogFactory.java:53)
at org.apache.paimon.catalog.CatalogFactory.createCatalog(CatalogFactory.java:76)
at org.apache.paimon.flink.FlinkCatalogFactory.createCatalog(FlinkCatalogFactory.java:63)
at org.apache.paimon.flink.FlinkCatalogFactory.createCatalog(FlinkCatalogFactory.java:53)
at org.apache.paimon.flink.FlinkCatalogFactory.createCatalog(FlinkCatalogFactory.java:32)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.paimon.hive.RetryingMetaStoreClientFactory.lambda$static$7(RetryingMetaStoreClientFactory.java:111)
at org.apache.paimon.hive.RetryingMetaStoreClientFactory.createClient(RetryingMetaStoreClientFactory.java:144)
... 54 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1654)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.(RetryingMetaStoreClient.java:80)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:86)
... 60 more
Caused by: java.lang.NoSuchMethodException: org.apache.hadoop.hive.metastore.HiveMetaStoreClient.(org.apache.hadoop.hive.conf.HiveConf, java.lang.Boolean)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1650)
... 63 more
`

### What doesn't meet your expectations?
Normal use hive hms create catalog.
### Anything else?
Inquiry question mr:
https://github.com/apache/paimon/pull/2354
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with RetryingMetaStoreClientFactory.java at the reported lines and HiveCatalog.java around createClient, then compare the reflected constructor expected by Hive 2.1.1 with the failing HiveMetaStoreClient signature. Reproduce using Paimon 0.7.0 with Flink 1.14 and Hive 2.1.1; done means creating a normal Hive HMS catalog succeeds without the constructor error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100