[HUDI-5731] Cleaning up unnecessary relocation for com.google.common packages#7900
Merged
alexeykudinkin merged 1 commit intoapache:masterfrom Feb 9, 2023
Merged
Conversation
xushiyan
approved these changes
Feb 8, 2023
4 tasks
KnightChess
approved these changes
Feb 9, 2023
Member
|
Thanks for fixing this issue. And I think curator should be relocated/removed as well. The issue happens on Kyuubi IT because
Based on the above facts, I think Hudi bundle jar should exclude the curator because the spark binary dist already shipped it, or relocated it to avoid class conflicts. Has a quick glance, rocksdb and some other libs are in the same position w/ curator, please consider excluding or relocating them to avoid potential class conflicts. |
Collaborator
fengjian428
pushed a commit
to fengjian428/hudi
that referenced
this pull request
Apr 5, 2023
…ache#7900) Addresses an issue of following relocations configs in MR/Spark bundles stranded after removal of Guava from Hudi Spark and MR bundles: ``` <relocation> <pattern>com.google.common.</pattern> <shadedPattern>org.apache.hudi.com.google.common.</shadedPattern> </relocation> ``` Such relocations entailed that all references from any class (included into the Hudi bundle) referencing Guava would be shaded, even though Hudi isn't packaging Guava anymore, potentially resulting in exception when these classes try to access Guava provided by Spark for ex: ``` Caused by: java.lang.NoClassDefFoundError: org/apache/hudi/com/google/common/base/Preconditions at org.apache.curator.ensemble.fixed.FixedEnsembleProvider.<init>(FixedEnsembleProvider.java:39) at org.apache.curator.framework.CuratorFrameworkFactory$Builder.connectString(CuratorFrameworkFactory.java:193) at org.apache.kyuubi.ha.client.zookeeper.ZookeeperClientProvider$.buildZookeeperClient(ZookeeperClientProvider.scala:62) at org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient.<init>(ZookeeperDiscoveryClient.scala:65) ... 45 more ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Logs
Addresses an issue of following relocations configs in MR/Spark bundles stranded after removal of Guava from Hudi Spark and MR bundles:
Such relocations entailed that all references from any class (included into the Hudi bundle) referencing Guava would be shaded, even though Hudi isn't packaging Guava anymore, potentially resulting in exception when these classes try to access Guava provided by Spark for ex:
Impact
See above
Risk level (write none, low medium or high below)
Low
Documentation Update
N/A
Contributor's checklist