Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-29983] Fix Table Store with Hive3 lacking hive-standalone-metastore dependency #373

Merged
merged 2 commits into from Nov 29, 2022

Conversation

LadyForest
Copy link
Contributor

For Hive3, org.apache.hadoop.hive.metastore.api is moved to org.apache.hive:hive-standalone-metastore. We should shade this package as well to avoid ClassNotFoundException

@LadyForest LadyForest changed the title [FLINK-29848] Fix Table Store with Hive3 lacking hive-standalone-metastore dependency [FLINK-29983] Fix Table Store with Hive3 lacking hive-standalone-metastore dependency Nov 11, 2022
@JingsongLi
Copy link
Contributor

Where is the problem? In Flink? Or in Hive?

@LadyForest
Copy link
Contributor Author

Where is the problem? In Flink? Or in Hive?

For all use case where HiveCatalog engaged

  1. HiveCatalog depends on org.apache.hadoop.hive.metastore.api
    image

  2. During the shading phase, all the package pattern org.apache.hadoop.hive is shaded as org.apache.flink.table.store.shaded.org.apache.hadoop.hive
    image

Well for org.apache.hadoop.hive.metastore.api, they exists in org.apache.hive:hive-metastore for Hive2, but is moved to org.apache.hive:hive-standalone-mteastore for Hive3.

This will cause NoClassDefFoundError for org.apache.flink.table.store.shaded.org.apache.hadoop.hive.metastore.api.XXX

Attach the stacktrace
image

@LadyForest
Copy link
Contributor Author

image

@LadyForest
Copy link
Contributor Author

LadyForest commented Nov 11, 2022

The reason why E2E does not reveal this issue is that the hive docker image is based on Hive2

@JingsongLi
Copy link
Contributor

Currently, we are using Hive2.3 Catalog (metastore client) for Hive 3.1, you can see it in hive.md:

Jar
Hive 2.3+ [flink-table-store-hive-catalog-{{< version >}}_2.3.jar]
Hive 2.2 [flink-table-store-hive-catalog-{{< version >}}_2.2.jar]
Hive 2.1 [flink-table-store-hive-catalog-{{< version >}}_2.1.jar]

If you want to support hive3 by Hive3 catalog, you should modify documentation too.

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LadyForest for the update.
Looks good to me!

@JingsongLi JingsongLi merged commit 6152dbc into apache:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants