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

[KYUUBI #5867] HiveEngine support run on YARN mode #5868

Closed
wants to merge 12 commits into from
Closed

[KYUUBI #5867] HiveEngine support run on YARN mode #5868

wants to merge 12 commits into from

Conversation

yikf
Copy link
Contributor

@yikf yikf commented Dec 16, 2023

🔍 Description

Issue References 🔗

This PR aims to support hive engine run on yarn mode, close #5867

Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

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


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.

@yikf
Copy link
Contributor Author

yikf commented Dec 16, 2023

@pan3793 Please take a look if you find a time

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2023

Codecov Report

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

Comparison is base (c6177ab) 61.57% compared to head (44f7287) 61.17%.
Report is 5 commits behind head on master.

Files Patch % Lines
...i/engine/deploy/yarn/EngineYarnModeSubmitter.scala 14.97% 171 Missing and 5 partials ⚠️
.../kyuubi/engine/deploy/yarn/ApplicationMaster.scala 7.04% 66 Missing ⚠️
...ngine/deploy/yarn/ApplicationMasterArguments.scala 0.00% 19 Missing ⚠️
...yuubi/engine/hive/HiveYarnModeProcessBuilder.scala 78.94% 15 Missing and 1 partial ⚠️
...apache/kyuubi/engine/hive/HiveProcessBuilder.scala 22.22% 7 Missing ⚠️
...in/scala/org/apache/kyuubi/config/KyuubiConf.scala 98.07% 0 Missing and 1 partial ⚠️
...ain/scala/org/apache/kyuubi/engine/EngineRef.scala 0.00% 1 Missing ⚠️
...pache/kyuubi/engine/KyuubiApplicationManager.scala 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5868      +/-   ##
============================================
- Coverage     61.57%   61.17%   -0.41%     
  Complexity       23       23              
============================================
  Files           616      621       +5     
  Lines         36388    36858     +470     
  Branches       4979     5014      +35     
============================================
+ Hits          22407    22548     +141     
- Misses        11568    11873     +305     
- Partials       2413     2437      +24     

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

@yikf
Copy link
Contributor Author

yikf commented Dec 21, 2023

Thanks @cxzl25 , will fix these issues mentioned in your comments.

@pan3793
Copy link
Member

pan3793 commented Dec 27, 2023

Tested locally with https://github.com/awesome-kyuubi/hadoop-testing

overall LGTM, some minor things nice to have (it depends on you to fix it in-place or postpone to the follow-up PRs)

image
  1. we should support proxy user as spark engine does (should be an independent PR)
  2. can we use the same rule to generate the engine app name
  3. maybe engine type should be KYUUBI ?
  4. set the tags, especially engine_ref_id, so that Kyuubi server could find it

Copy link
Member

@pan3793 pan3793 left a comment

Choose a reason for hiding this comment

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

I think it's already in a good shape, ready to go

.doc(s"kyuubi engine container memory in mb when `${ENGINE_DEPLOY_MODE.key}` is YARN.")
.version("1.9.0")
.intConf
.createWithDefault(1024)
Copy link
Member

Choose a reason for hiding this comment

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

use human-readable format? e.g. 1g, 1024m

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, plan support bytesConf in the follow up PR

@pan3793
Copy link
Member

pan3793 commented Dec 27, 2023

I just found out we can leverage the YARN mode to address another existing issue of Hive engine: the Apache Hive released binary tarball ships an old version of Scala and Spark jars, we can exclude those jars to avoid potential class conflict issues.

@yaooqinn
Copy link
Member

Comparison is base (c6177ab) 61.57% compared to head (5a36d6e) 60.96%.

Can we also improve the test coverage?

@yikf
Copy link
Contributor Author

yikf commented Dec 28, 2023

Comparison is base (c6177ab) 61.57% compared to head (5a36d6e) 60.96%.

Can we also improve the test coverage?

Sure

@yikf
Copy link
Contributor Author

yikf commented Dec 28, 2023

image

Now, it contains the appropriate Name, Application Type and Application Tags

@pan3793 pan3793 added this to the v1.9.0 milestone Dec 29, 2023
@zhouyifan279
Copy link
Contributor

zhouyifan279 commented Dec 29, 2023

LGTM.

@@ -45,7 +45,10 @@ class HiveSQLEngine extends Serverable("HiveSQLEngine") {
super.start()
// Start engine self-terminating checker after all services are ready and it can be reached by
// all servers in engine spaces.
backendService.sessionManager.startTerminatingChecker(() => stop())
backendService.sessionManager.startTerminatingChecker(() => {
selfExist = true
Copy link
Contributor

@zhouyifan279 zhouyifan279 Dec 29, 2023

Choose a reason for hiding this comment

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

Maybe selfExited ?

@pan3793 pan3793 closed this in 679aca5 Dec 29, 2023
@pan3793
Copy link
Member

pan3793 commented Dec 29, 2023

@yikf Thanks, merged to master. we can address the minor comments in follow-up PRs.

pan3793 added a commit that referenced this pull request Dec 29, 2023
# 🔍 Description
## Issue References 🔗

This pull request is a follow-up of #5867, to fix generated configuration docs and typo to recover CI.

## Describe Your Solution 🔧

Regenerated docs by performing `dev/gen/gen_all_config_docs.sh`
Address comment #5868 (comment)

## Types of changes 🔖

- [x] 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.

---

# 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 #5932 from pan3793/fix-docs.

Closes #5867

93b8f97 [Cheng Pan] docs
0ad0d29 [Cheng Pan] typo

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
@yikf yikf deleted the hive-on-yarn branch January 30, 2024 11:08
zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
# 🔍 Description
## Issue References 🔗

This PR aims to support hive engine run on yarn mode, close apache#5867

## Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] 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

---

# Checklists
## 📝 Author Self Checklist

- [ ] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) 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
- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

## 📝 Committer Pre-Merge Checklist

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

**Be nice. Be informative.**

Closes apache#5868 from Yikf/hive-on-yarn.

Closes apache#5867

44f7287 [yikaifei] fix
3c17d2c [yikaifei] fix test
5474ebf [yikaifei] parse classpath
6b97c42 [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/engine/deploy/yarn/EngineYarnModeSubmitter.scala
34a67b4 [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/engine/deploy/yarn/EngineYarnModeSubmitter.scala
5e5045e [yikaifei] fix app type
d1eb5ae [yikaifei] fix
d89d09c [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/engine/deploy/yarn/EngineYarnModeSubmitter.scala
1fa18ba [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/engine/deploy/yarn/ApplicationMaster.scala
1b0b77f [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/engine/deploy/yarn/ApplicationMaster.scala
2ed1d44 [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/engine/deploy/yarn/EngineYarnModeSubmitter.scala
98ff19c [yikaifei] HiveEngine support run on YARN mode

Lead-authored-by: yikaifei <yikaifei@apache.org>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
# 🔍 Description
## Issue References 🔗

This pull request is a follow-up of apache#5867, to fix generated configuration docs and typo to recover CI.

## Describe Your Solution 🔧

Regenerated docs by performing `dev/gen/gen_all_config_docs.sh`
Address comment apache#5868 (comment)

## Types of changes 🔖

- [x] 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.

---

# 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#5932 from pan3793/fix-docs.

Closes apache#5867

93b8f97 [Cheng Pan] docs
0ad0d29 [Cheng Pan] typo

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
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.

[FEATURE] Hive engine support run on yarn mode
6 participants