1.11.1 Hive connector doesn't work with Hive 1.0 or 1.1

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

1.11.1 Hive connector doesn't work with Hive 1.0 or 1.1

Rui Li
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
Reply | Threaded
Open this post in threaded view
|

Re: 1.11.1 Hive connector doesn't work with Hive 1.0 or 1.1

Dian Fu-2
Hi Rui,

The maven artifacts are built using the script: releasing/deploy_staging_jars.sh [1].

Regards,
Dian

[1] https://cwiki.apache.org/confluence/display/FLINK/Creating+a+Flink+Release

> 在 2020年9月8日,下午7:19,Rui Li <[hidden email]> 写道:
>
> maven artifacts

Reply | Threaded
Open this post in threaded view
|

Re: 1.11.1 Hive connector doesn't work with Hive 1.0 or 1.1

Rui Li
Thanks Dian. The script looks all right to me. I'll double check with the
user whether the issue is related to his building environment.

On Tue, Sep 8, 2020 at 7:36 PM Dian Fu <[hidden email]> wrote:

> Hi Rui,
>
> The maven artifacts are built using the
> script: releasing/deploy_staging_jars.sh [1].
>
> Regards,
> Dian
>
> [1]
> https://cwiki.apache.org/confluence/display/FLINK/Creating+a+Flink+Release
>
> 在 2020年9月8日,下午7:19,Rui Li <[hidden email]> 写道:
>
> maven artifacts
>
>
>

--
Best regards!
Rui Li
Reply | Threaded
Open this post in threaded view
|

Re: 1.11.1 Hive connector doesn't work with Hive 1.0 or 1.1

Rui Li
Verified the issue was related to the building environment. The published
jar is good. Thanks Dian for the help.

On Tue, Sep 8, 2020 at 7:49 PM Rui Li <[hidden email]> wrote:

> Thanks Dian. The script looks all right to me. I'll double check with the
> user whether the issue is related to his building environment.
>
> On Tue, Sep 8, 2020 at 7:36 PM Dian Fu <[hidden email]> wrote:
>
>> Hi Rui,
>>
>> The maven artifacts are built using the
>> script: releasing/deploy_staging_jars.sh [1].
>>
>> Regards,
>> Dian
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/FLINK/Creating+a+Flink+Release
>>
>> 在 2020年9月8日,下午7:19,Rui Li <[hidden email]> 写道:
>>
>> maven artifacts
>>
>>
>>
>
> --
> Best regards!
> Rui Li
>


--
Best regards!
Rui Li