shuzirra commented on a change in pull request #3500:
URL: https://github.com/apache/hadoop/pull/3500#discussion_r724271195



##########
File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
##########
@@ -2326,6 +2326,57 @@ public void stopQueue() {
     }
   }
 
+  void updateMaximumApplications(CapacitySchedulerConfiguration conf) {
+    int maxAppsForQueue = conf.getMaximumApplicationsPerQueue(getQueuePath());
+
+    int maxGlobalApplications = conf.getGlobalMaximumApplicationsPerQueue();
+    int maxSystemApplications = conf.getMaximumSystemApplications();
+    int baseMaxApplications = maxGlobalApplications > 0 ?
+        maxGlobalApplications : maxSystemApplications;

Review comment:
       I think, this should be more like a Math.min situation, if the maxGlobal 
is defined, it is a per queue limit, while max System is the total number of 
applications, so if System is set, it should be always a limiting factor. Also 
if System is too high, then maxGlobal should be the limiting factor, so it's 
more like 
   
   maxGlobalApplications > 0 ? Math.min(maxGlobalApplications, 
maxSystemApplications) : maxSystemApplications;
   
   
   




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



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

Reply via email to