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

Cut out hive-common deps in beeline module #6162

Closed
wants to merge 2 commits into from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Mar 11, 2024

🔍 Description

Issue References 🔗

This PR removes the hive-common dep from the beeline module, and it is the final step of cutting out all Hive deps from the beeline module.

Describe Your Solution 🔧

  • Remove support of Hive CLI mode (a.k.a. beelineMode == false) on beeline.
  • Copy ~7 classes (~600 lines) from org.apache.hive:hive-common:3.1.3
  • Drop org.apache.hive:hive-common:3.1.3 from beeline module

Note: Hive CLI mode removal is necessary, because it is useless for Kyuubi cases and seriously coupled with HiveConf

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 🧪

Pass GA, and manually tested.

root@hadoop-master1:/opt/kyuubi# beeline
Connecting to jdbc:hive2://hadoop-master1.orb.local:10000/default;password=hive;user=hive
Connected to: Apache Hive (version 2.3.9)
Driver: Kyuubi Project Hive JDBC Client (version 1.9.0-SNAPSHOT)
Beeline version 1.9.0-SNAPSHOT by Apache Kyuubi
0: jdbc:hive2://hadoop-master1.orb.local:1000> select version();
+--------------------------------------------------+
|                       _c0                        |
+--------------------------------------------------+
| 2.3.9 r92dd0159f440ca7863be3232f3a683a510a62b9d  |
+--------------------------------------------------+
1 row selected (1.443 seconds)
0: jdbc:hive2://hadoop-master1.orb.local:1000>

Checklist 📝

Be nice. Be informative.

@github-actions github-actions bot added kind:infra license, community building, project builds, asf infra related, etc. module:hive module:ctl kind:build labels Mar 11, 2024
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/*
* Looks for a hive-site.xml from the classpath. If found this class parses the hive-site.xml
* to return a set of connection properties which can be used to construct the connection url
* for Beeline connection
*
* This class is modified to get rid of dependency on HiveConf
*/
public class HiveSiteHS2ConnectionFileParser implements HS2ConnectionFileParser {
Copy link
Member Author

@pan3793 pan3793 Mar 11, 2024

Choose a reason for hiding this comment

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

it's easy to extend the HS2ConnectionFileParser to make the beeline support auto-getting connection URL from kyuubi-defaults.conf, we should make such an extension in the future.

@pan3793 pan3793 requested a review from ulysses-you March 11, 2024 14:19
@pan3793
Copy link
Member Author

pan3793 commented Mar 11, 2024

cc @zhouyifan279

@pan3793 pan3793 added this to the v1.9.0 milestone Mar 11, 2024
@pan3793 pan3793 self-assigned this Mar 11, 2024
@pan3793
Copy link
Member Author

pan3793 commented Mar 12, 2024

@ulysses-you As we discussed offline, in case users may pull hive-beeline as a dependency, to reduce the effort of migration to kyuubi-hive-beeline, I moved all classes copied from hive-common to the package org.apache.hive.beeline.common.

@pan3793 pan3793 closed this in ddf347f Mar 12, 2024
@pan3793
Copy link
Member Author

pan3793 commented Mar 12, 2024

Thanks, merged to master

@pan3793 pan3793 deleted the beeline-3 branch March 12, 2024 07:23
zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
# 🔍 Description
## Issue References 🔗

This PR removes the `hive-common` dep from the beeline module, and it is the final step of cutting out all Hive deps from the beeline module.

## Describe Your Solution 🔧

- Remove support of Hive CLI mode (a.k.a. `beelineMode == false`) on beeline.
- Copy ~7 classes (~600 lines) from `org.apache.hive:hive-common:3.1.3`
- Drop `org.apache.hive:hive-common:3.1.3` from beeline module

Note: Hive CLI mode removal is necessary, because it is useless for Kyuubi cases and seriously coupled with `HiveConf`

## 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 🧪

Pass GA, and manually tested.

```
roothadoop-master1:/opt/kyuubi# beeline
Connecting to jdbc:hive2://hadoop-master1.orb.local:10000/default;password=hive;user=hive
Connected to: Apache Hive (version 2.3.9)
Driver: Kyuubi Project Hive JDBC Client (version 1.9.0-SNAPSHOT)
Beeline version 1.9.0-SNAPSHOT by Apache Kyuubi
0: jdbc:hive2://hadoop-master1.orb.local:1000> select version();
+--------------------------------------------------+
|                       _c0                        |
+--------------------------------------------------+
| 2.3.9 r92dd0159f440ca7863be3232f3a683a510a62b9d  |
+--------------------------------------------------+
1 row selected (1.443 seconds)
0: jdbc:hive2://hadoop-master1.orb.local:1000>
```

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes apache#6162 from pan3793/beeline-3.

Closes apache#6162

e85f096 [Cheng Pan] relocate
b2ce8ef [Cheng Pan] Cut out hive-common deps in beeline module

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:build kind:infra license, community building, project builds, asf infra related, etc. module:ctl module:hive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants