yunikorn-core
yunikorn-core copied to clipboard
[YUNIKORN-2494] Revisit IsAtorAbove, WithIn, GetRemaining Guaranteed …
…resources calculation
What is this PR for?
Methods like IsAtorAbove, WithIn etc doesn't expose the actual guaranteed values and returns boolean value based on the calculation. There are cases, where these boolean values are not correct and also there is a need to know the actual guaranteed values. For example, How much is remaining in Guaranteed? How much can be preempted? etc.
Introduced new methods to expose the actual values and incorporated the same into existing preemption flow. Added tests cases to cover the new methods as well.
What type of PR is it?
- [ ] - Improvement
Todos
- [ ] - Task
What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-2494
How should this be tested?
Screenshots (if appropriate)
Questions:
- [ ] - The licenses files need update.
- [ ] - There is breaking changes for older versions.
- [ ] - It needs documentation.