Hello dev,
A user hits the following issue when using Flink 1.11.1 to connect to Hive
1.1.0:
java.lang.NoSuchMethodError:
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(Lorg/apache/hadoop/conf/Configuration;)V
> at
> org.apache.flink.table.catalog.hive.client.HiveShimV100.getHiveMetastoreClient(HiveShimV100.java:97)
The HiveMetastoreClient constructor takes a HiveConf parameter in Hive
2.3.4 [1], which is the default hive version we build with. But in Hive
3.1.1, the signature changed and takes a Configuration parameter instead
[2].
So I suspect the hive connector jar we published in 1.11.1 was somehow
built against Hive 3.x -- we do have a Hive-3.1.1 maven profile to build &
test with 3.1.1. If that's the case, then the 1.11.1 hive connector won't
work with Hive 1.0 and 1.1. I asked the user to fall back to 1.11.0 and the
problem goes away.
Could anybody let me know how we built the maven artifacts for the release?
Thanks.
[1]
https://github.com/apache/hive/blob/rel/release-2.3.4/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L128[2]
https://github.com/apache/hive/blob/rel/release-3.1.1/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L136--
Best regards!
Rui Li