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 #5373] Engine adaptive pool size #5662

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lsm1
Copy link
Contributor

@lsm1 lsm1 commented Nov 9, 2023

Why are the changes needed?

close #5373

This pull request aims to support adaptive engine selection. The specific improvements are as follows:

  1. Spark Engine Reports Status to Zookeeper Regularly: We have modified the Spark engine to periodically report the counts of its OpenSessionCount and ActiveTask to Zookeeper.

  2. Server Selects Engine Based on Load: The server will select the engine with the lightest load for task allocation based on the information obtained from Zookeeper.

  3. New Engine is Created When OpenSession Exceeds Threshold: If the OpenSession count of all engines exceeds a set threshold, the server will submit a new engine.

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 locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2023

Codecov Report

Attention: Patch coverage is 20.00000% with 72 lines in your changes are missing coverage. Please review.

Project coverage is 58.32%. Comparing base (dd0aced) to head (688ea74).
Report is 1 commits behind head on master.

Files Patch % Lines
...rg/apache/kyuubi/engine/spark/SparkSQLEngine.scala 7.50% 36 Missing and 1 partial ⚠️
...ain/scala/org/apache/kyuubi/engine/EngineRef.scala 3.12% 30 Missing and 1 partial ⚠️
...in/scala/org/apache/kyuubi/config/KyuubiConf.scala 85.71% 0 Missing and 2 partials ⚠️
...ache/kyuubi/ha/client/EngineServiceDiscovery.scala 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5662      +/-   ##
============================================
- Coverage     58.49%   58.32%   -0.17%     
  Complexity       24       24              
============================================
  Files           653      653              
  Lines         39865    39954      +89     
  Branches       5481     5492      +11     
============================================
- Hits          23319    23305      -14     
- Misses        14055    14149      +94     
- Partials       2491     2500       +9     

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

client.create(metricsSpace, "PERSISTENT")
}
client.setData(
s"/metrics$engineSpace",
Copy link
Member

@pan3793 pan3793 Nov 21, 2023

Choose a reason for hiding this comment

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

is it feasible to append the "load" value in engine's info zonde, and update in place?

if not, and decide to use a new path, we should consider deleting it after engine dead
@yaooqinn how do you think of this path to store engine metrics?

@lsm1 lsm1 force-pushed the branch-kyuubi-5373 branch from e339ddf to f01d130 Compare December 21, 2023 07:53
@lsm1 lsm1 force-pushed the branch-kyuubi-5373 branch 2 times, most recently from af19ce0 to 60852c0 Compare March 26, 2024 07:55
@lsm1 lsm1 force-pushed the branch-kyuubi-5373 branch from 559845c to 688ea74 Compare April 28, 2024 11:52
@cxzl25 cxzl25 added this to the v1.10.0 milestone May 16, 2024
@cxzl25
Copy link
Contributor

cxzl25 commented May 16, 2024

cc @pan3793 @cfmcgrady

@bowenliang123 bowenliang123 removed this from the v1.10.0 milestone Oct 17, 2024
@bowenliang123 bowenliang123 added this to the v1.11.0 milestone Oct 17, 2024
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.

[TASK][MEDIUM] Engine adaptive pool size
5 participants