-
Notifications
You must be signed in to change notification settings - Fork 256
[YUNIKORN-3142] Calculate Preemptable Resource for leaf Queue with same resource types #1039
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1039 +/- ##
=======================================
Coverage 81.50% 81.51%
=======================================
Files 102 102
Lines 13337 13354 +17
=======================================
+ Hits 10870 10885 +15
- Misses 2208 2209 +1
- Partials 259 260 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Does this depend on #1038 ? I can see overlapping changes here. |
…me resource types
c8b6d5e to
0297e10
Compare
Rebased the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor question about "nil" return
| maxRes := qcp.queue.CloneMaxResource() | ||
| used := resources.SubOnlyExisting(qcp.queue.GetAllocatedResource(), qcp.queue.GetPreemptingResource()) | ||
| if maxRes.IsEmpty() || used.IsEmpty() { | ||
| return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: wouldn't it be safer to always return something instead of "nil"? To me, a resources.Zero() seems to be more appropriate.
| if preemptableResource.IsEmpty() { | ||
| return nil | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
What is this PR for?
Calculate Preemptable Resource for the leaf queue.
What type of PR is it?
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-3142
How should this be tested?
Screenshots (if appropriate)
Questions: