zhuqi-lucas commented on code in PR #927:
URL: https://github.com/apache/yunikorn-core/pull/927#discussion_r1714567961


##########
pkg/scheduler/partition.go:
##########
@@ -342,13 +342,19 @@ func (pc *PartitionContext) AddApplication(app 
*objects.Application) error {
 
        guaranteedRes := app.GetGuaranteedResource()
        maxRes := app.GetMaxResource()
-       if !isRecoveryQueue && (guaranteedRes != nil || maxRes != nil) {
+       maxApps := app.GetMaxApps()
+       if !isRecoveryQueue && (guaranteedRes != nil || maxRes != nil || 
maxApps != 0) {
                // set resources based on tags, but only if the queue is 
dynamic (unmanaged)
                if queue.IsManaged() {
                        log.Log(log.SchedQueue).Warn("Trying to set resources 
on a queue that is not an unmanaged leaf",
                                zap.String("queueName", queue.QueuePath))
                } else {
-                       queue.SetResources(guaranteedRes, maxRes)
+                       if maxApps != 0 {
+                               queue.SetMaxRunningApps(maxApps)

Review Comment:
   Added the testing, thanks @pbacsko !



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to