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

Switch to kyuubi-relocated-hive-service-rpc #5783

Closed
wants to merge 10 commits into from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Nov 27, 2023

🔍 Description

Issue References 🔗

TL;DR there are some issues with shading Thrift RPC classes during the engine packaging phase, see details in the PR description of apache/kyuubi-shaded#20.

Describe Your Solution 🔧

This PR aims to migrate from vanilla hive-service-rpc, libfb303, libthrift to kyuubi-relocated-hive-service-rpc introduced in apache/kyuubi-shaded#20, the detailed works are:

  • replace imported deps in pom.xml and rename the package prefix in all modules, except for
    • kyuubi-server there are a few places use vanilla thrift classes to access HMS to get token
    • kyuubi-hive-sql-engine Hive method invocation
  • update relocations rules in modules that creates shaded jar
  • introduce HiveRpcUtils in kyuubi-hive-sql-engine module for object conversion.

As part of the whole change, this PR upgrades from the Kyuubi Shaded 0.1.0 to 0.2.0, which changes the jars name. see https://kyuubi.apache.org/shaded-release/0.2.0.html

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

Behavior Without This Pull Request ⚰️

Behavior With This Pull Request 🎉

Related Unit Tests

Pass all Hive UT with Hive 3.1.3, and IT with Hive 3.1.3 and 2.3.9 (also tested with 2.1.1-cdh6.3.2)


Checklists

📝 Author Self Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • This patch was not authored or co-authored using Generative Tooling

📝 Committer Pre-Merge Checklist

  • Pull request title is okay.
  • No license issues.
  • Milestone correctly set?
  • Test coverage is ok
  • Assignees are selected.
  • Minimum number of approvals
  • No changes are requested

Be nice. Be informative.

@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (f3f643a) 61.27% compared to head (1d82010) 61.46%.
Report is 2 commits behind head on master.

❗ Current head 1d82010 differs from pull request most recent head b45d4de. Consider uploading reports for the commit b45d4de to get more accurate results

Files Patch % Lines
.../org/apache/kyuubi/session/KyuubiSessionImpl.scala 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5783      +/-   ##
============================================
+ Coverage     61.27%   61.46%   +0.19%     
  Complexity       23       23              
============================================
  Files           608      608              
  Lines         36050    35941     -109     
  Branches       4951     4940      -11     
============================================
+ Hits          22088    22092       +4     
+ Misses        11567    11457     -110     
+ Partials       2395     2392       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pan3793 pan3793 changed the title WIP: Switch to kyuubi-shaded-hive-service-rpc WIP: Switch to kyuubi-relocated-hive-service-rpc Dec 4, 2023
pan3793 added a commit to apache/kyuubi-shaded that referenced this pull request Dec 4, 2023
…m to remove deps of snappy in ZK client 3.6

### _Why are the changes needed?_

This is step 2 of #28

> 2. remove the Snappy support (simply throw `UnsupportedOperationException`) in `org.apache.zookeeper.server.persistence.SnapStream` and snappy deps

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

- [x] Verified through apache/kyuubi#5783

Closes #29 from pan3793/snappy-2.

a109d1c [Cheng Pan] [KYUUBI-SHADED #28] Step 1/2: Overwrite SnapStream to remove deps of snappy in ZK client 3.6

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 added a commit to apache/kyuubi-shaded that referenced this pull request Dec 4, 2023
…snappy in ZK client 3.6

### _Why are the changes needed?_

This is step 2 of #28

> 2. remove the Snappy support (simply throw `UnsupportedOperationException`) in `org.apache.zookeeper.server.persistence.SnapStream` and snappy deps

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

- [x] Verified through apache/kyuubi#5783

Closes #29 from pan3793/snappy-2.

a109d1c [Cheng Pan] [KYUUBI-SHADED #28] Step 1/2: Overwrite SnapStream to remove deps of snappy in ZK client 3.6

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
@pan3793 pan3793 changed the title WIP: Switch to kyuubi-relocated-hive-service-rpc Switch to kyuubi-relocated-hive-service-rpc Dec 7, 2023
@pan3793 pan3793 added this to the v1.9.0 milestone Dec 7, 2023
@pan3793 pan3793 self-assigned this Dec 7, 2023
@pan3793
Copy link
Member Author

pan3793 commented Dec 7, 2023

also cc @zhouyifan279

Copy link
Member

@wForget wForget left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

The title description needs to be updated, this pr also switches kyuubi-relocated-zookeeper-34.

@pan3793
Copy link
Member Author

pan3793 commented Dec 7, 2023

@wForget thanks for checking, I updated the PR description

@@ -187,6 +187,21 @@
</exclusions>
</dependency>

<dependency>
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to add a comment here to explain why these dependencies are retained?

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry I missed this comment, it would be straightforward if the user searches the codebase with the keyword "import org.apache.thrift"

@pan3793 pan3793 closed this in 9be0c65 Dec 7, 2023
@pan3793
Copy link
Member Author

pan3793 commented Dec 7, 2023

Thanks, merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants