Emor-nj opened a new issue, #30984: URL: https://github.com/apache/doris/issues/30984
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version 2.0.3 ### What's Wrong? These SQL statements in iceberg hms would result in errors: ``` select * from iceberg_ttt.tmp.iceberg_01; show tables from iceberg_ttt.tmp; ``` The error is: ``` [2024-02-08 00:48:12] [HY000][1105] RuntimeException, msg: org.apache.doris.common.UserException: errCode = 2, detailMessage = shade.doris.hive.org.apache.thrift.TApplicationException: Invalid method name: 'get_table_objects_by_name_req' [2024-02-08 00:48:12] at shade.doris.hive.org.apache.thrift.TApplicationException.read(TApplicationException.java:111) [2024-02-08 00:48:12] at shade.doris.hive.org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79) [2024-02-08 00:48:12] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_table_objects_by_name_req(ThriftHiveMetastore.java:2108) [2024-02-08 00:48:12] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_table_objects_by_name_req(ThriftHiveMetastore.java:2095) [2024-02-08 00:48:12] at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTableObjectsByName(HiveMetaStoreClient.java:1822) [2024-02-08 00:48:12] at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTableObjectsByName(HiveMetaStoreClient.java:1812) [2024-02-08 00:48:12] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [2024-02-08 00:48:12] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [2024-02-08 00:48:12] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2024-02-08 00:48:12] at java.lang.reflect.Method.invoke(Method.java:498) [2024-02-08 00:48:12] at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:208) [2024-02-08 00:48:12] at com.sun.proxy.$Proxy115.getTableObjectsByName(Unknown Source) [2024-02-08 00:48:12] at org.apache.iceberg.hive.HiveCatalog.lambda$listTables$2(HiveCatalog.java:125) [2024-02-08 00:48:12] at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:58) [2024-02-08 00:48:12] at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:51) [2024-02-08 00:48:12] at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:82) [2024-02-08 00:48:12] at org.apache.iceberg.hive.HiveCatalog.listTables(HiveCatalog.java:125) [2024-02-08 00:48:12] at org.apache.doris.datasource.iceberg.IcebergExternalCatalog.listTableNames(IcebergExternalCatalog.java:100) [2024-02-08 00:48:12] at org.apache.doris.catalog.external.ExternalDatabase.init(ExternalDatabase.java:163) [2024-02-08 00:48:12] at org.apache.doris.catalog.external.ExternalDatabase.makeSureInitialized(ExternalDatabase.java:135) [2024-02-08 00:48:12] at org.apache.doris.service.FrontendServiceImpl.initDb(FrontendServiceImpl.java:2315) [2024-02-08 00:48:12] at org.apache.doris.service.FrontendServiceImpl.initExternalCtlMeta(FrontendServiceImpl.java:2275) [2024-02-08 00:48:12] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [2024-02-08 00:48:12] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [2024-02-08 00:48:12] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2024-02-08 00:48:12] at java.lang.reflect.Method.invoke(Method.java:498) [2024-02-08 00:48:12] at org.apache.doris.service.FeServer.lambda$start$0(FeServer.java:59) [2024-02-08 00:48:12] at com.sun.proxy.$Proxy36.initExternalCtlMeta(Unknown Source) [2024-02-08 00:48:12] at org.apache.doris.thrift.FrontendService$Processor$initExternalCtlMeta.getResult(FrontendService.java:3672) [2024-02-08 00:48:12] at org.apache.doris.thrift.FrontendService$Processor$initExternalCtlMeta.getResult(FrontendService.java:3652) [2024-02-08 00:48:12] at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) [2024-02-08 00:48:12] at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) [2024-02-08 00:48:12] at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:250) [2024-02-08 00:48:12] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [2024-02-08 00:48:12] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [2024-02-08 00:48:12] at java.lang.Thread.run(Thread.java:750) ``` The reason is IcebergExternalCatalog is using org.apache.iceberg.hive.HiveCatalog(), which would call listTables() function. The function listTables() calls the getTableObjectsByName() method in the Doris-refactored HiveMetaStoreClient. However, the getTableObjectsByName() method lacks support for different versions of Hive, causing Hive V1_0 and V2_0 to also invoke the get_table_objects_by_name_req() method. Since the metastore server for Hive V1_0 and V2_0 does not have a corresponding handler for this method, it results in the mentioned exception being thrown. ### What You Expected? fix this bug. ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
