Chen Yu Teng created YUNIKORN-1238:
--------------------------------------

             Summary: 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


We can set node sorting policy with fair policy when partition called 
NewNodeCollection function.

In [nodeCollection 
level|[https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/objects/node_collection.go#L228-L235]|https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/objects/node_collection.go#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|[https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/partition.go#L1449-L1457]).]

In partition level,  original flow will be like.
 # Creates nodeCollection that node sorting policy is 
nil([code|[https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/partition.go#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.7#820007)

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

Reply via email to