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

Craig Condit commented on YUNIKORN-1238:
----------------------------------------

Given the "magic" that nil == fair in the current implementation, I'm for the 
change just to make that explicit and remove the extra nil checks, even though 
this isn't strictly necessary.

> Setting fair node policy instead of nil is in NewNodeCollection
> ---------------------------------------------------------------
>
>                 Key: YUNIKORN-1238
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1238
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - scheduler
>            Reporter: Chen Yu Teng
>            Assignee: Chen Yu Teng
>            Priority: Minor
>              Labels: pull-request-available
>
> We can set node sorting policy with fair policy when partition called 
> NewNodeCollection function.
> In [nodeCollection level|#L228-L235], the node sorting policy is nil and the 
> order of nodes in nodeCollection is the time adding node. If partition call 
> nodes.GetNodeSortingPolicy() which is nil, nil will be treated as fair 
> although the behavior of node sorting is not the behavior with fair 
> policy([code|#L1449-L1457]).
> In partition level,  original flow will be like.
>  # Creates nodeCollection that node sorting policy is nil([code|#L95])
>  # In updateNodeSortingPolicy function, partition updates related fields from 
> config. If policy in config is empty , SortingPolicyFromString function will 
> return fair policy, partition update node sorting policy by 
> nodes.SetNodeSortingPolicy(fair policy)
> I want to modify the node sorting policy in 1 step and set the default node 
> sorting policy is fair policy.
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to