You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Rainie Li (Jira)" <ji...@apache.org> on 2022/09/01 18:54:00 UTC

[jira] [Comment Edited] (YUNIKORN-790) Implement MaxApplications enforcement

    [ https://issues.apache.org/jira/browse/YUNIKORN-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17598602#comment-17598602 ] 

Rainie Li edited comment on YUNIKORN-790 at 9/1/22 6:53 PM:
------------------------------------------------------------

hi [~wilfreds] [~ccondit] [~weiweiyagn666] Thanks for providing feedback last week.

I merged two PRs into [https://github.com/apache/yunikorn-core/pull/429] Please review it.  I added end to end load test result into PR. It's working now :)

This time I added two following changes:
 # Besides {*}tryAllocate{*}, state machine gets updated by *tryReservedAllocate* as well. That's why I added IfCanRun then increase allocatingAcceptedApps number in both places.
 # AllocatingAcceptedApps number gets decreased in two scenarios: 
 ## when allocation fails (return nil) in tryAllocate or tryReservedAllocate
 ## app enters Running state (state machine)
 # I am using *map* instead of int to track allocatingAcceptedApps, since both tryAllocate and tryReservedAllocate will update this number asynchronously. To avoid same application gets added or deleted multiple times, we need to use map. It's just a set. I set appID as key, {} as value, since Go doesn't' have set. 

Feel free to let me know if you have any question or suggestion. 


was (Author: rainieli):
hi [~wilfreds] [~ccondit] Thanks for providing feedback last week.

I merged two PRs into [https://github.com/apache/yunikorn-core/pull/429] Please review it.  I added end to end load test result into PR. It's working now :)

This time I added two following changes:
 # Besides {*}tryAllocate{*}, state machine gets updated by *tryReservedAllocate* as well. That's why I added IfCanRun then increase allocatingAcceptedApps number in both places.
 # AllocatingAcceptedApps number gets decreased in two scenarios: 
 ## when allocation fails (return nil) in tryAllocate or tryReservedAllocate
 ## app enters Running state (state machine)
 # I am using *map* instead of int to track allocatingAcceptedApps, since both tryAllocate and tryReservedAllocate will update this number asynchronously. To avoid same application gets added or deleted multiple times, we need to use map. It's just a set. I set appID as key, {} as value, since Go doesn't' have set. 

Feel free to let me know if you have any question or suggestion. 

> Implement MaxApplications enforcement
> -------------------------------------
>
>                 Key: YUNIKORN-790
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-790
>             Project: Apache YuniKorn
>          Issue Type: New Feature
>          Components: core - scheduler
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Rainie Li
>            Priority: Major
>              Labels: pull-request-available
>
> Queues have an option to set the MaxApplications that can run in a queue. There is currently no code in the scheduler that checks this setting.
> As a new feature we should add the enforcement for this setting:
>  * enforce the setting on a leaf queue
>  * enforce the setting on a parent, the apps running in a parent queue is defined as the sum of all the apps running in all leaf queues of the parent.
> As a side note from a config check: we need to make sure that the parent setting cannot be lower than any of the child queues it has. We _must not_ enforce that the parent setting must be larger than sum of all leafs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org