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


##########
pkg/scheduler/objects/application.go:
##########
@@ -2157,6 +2157,11 @@ func (sa *Application) GetMaxResource() 
*resources.Resource {
        return sa.getResourceFromTags(siCommon.AppTagNamespaceResourceQuota)
 }
 
+// GetMaxApps returns the max apps that is set in the application tags
+func (sa *Application) GetMaxApps() string {

Review Comment:
   Addressed it in latest PR, thanks @wilfred-s for review.



##########
pkg/scheduler/objects/queue.go:
##########
@@ -444,12 +445,25 @@ func (sq *Queue) setResources(guaranteedResource, 
maxResource *resources.Resourc
                log.Log(log.SchedQueue).Debug("guaranteed resources setting 
ignored: cannot set zero guaranteed resources",
                        zap.String("queue", sq.QueuePath))
        }
+
+       // For shim side we already make sure the max apps > 0 and valid parsing
+       maxAppsInt, err := strconv.ParseInt(maxApps, 10, 64)
+       maxAppsUint := uint64(maxAppsInt)
+       if err == nil {
+               log.Log(log.SchedQueue).Debug("setting max running apps",
+                       zap.String("queue", sq.QueuePath),
+                       zap.Uint64("current", sq.maxRunningApps),
+                       zap.Uint64("new", maxAppsUint))
+       }
+       sq.maxRunningApps = maxAppsUint

Review Comment:
   Addressed it in latest PR, thanks @wilfred-s for review.



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