marton-bod commented on a change in pull request #1478:
URL: https://github.com/apache/iceberg/pull/1478#discussion_r496843815
##########
File path:
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveClientPool.java
##########
@@ -41,7 +41,16 @@ public HiveClientPool(int poolSize, Configuration conf) {
@Override
protected HiveMetaStoreClient newClient() {
try {
- return new HiveMetaStoreClient(hiveConf);
+ // create the metastore client based on whether we're working with Hive2
or Hive3 dependencies
+ // we need to do this because there is a breaking API change between
Hive2 and Hive3
+ if (MetastoreUtil.hive3PresentOnClasspath()) {
+ return (HiveMetaStoreClient) Class
+ .forName(HiveMetaStoreClient.class.getName())
+ .getConstructor(Configuration.class)
+ .newInstance(hiveConf);
Review comment:
makes sense, thanks for the suggestion
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]