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

Benjamin Teke commented on YARN-9930:
-------------------------------------

[~pbacsko], some other nits to Adam's one:
 * AbstractCSQueue has the following logic to get the max parallel apps 
setting, and CSMaxRunningAppsEnforcer has a similar one. I think it would be 
cleaner to put this logic into CapacitySchedulerConfiguration replacing the 
getMaxParallelAppsForQueue method, as the Configuration base class has a getInt 
method which already does the null check->return default value step. If the 
default configuration is needed separately for some reason (regardless if it 
has been overridden or not), then it can have a separate getter. This also 
falls more in line with the rest of the Configuration class to my eye.
{code:java}
int defaultMaxParallelApps =
          configuration.getDefaultMaxParallelAppsForQueue();
Integer queueMaxParallelApps =
          configuration.getMaxParallelAppsForQueue(getQueuePath());
setMaxParallelApps(queueMaxParallelApps != null
          ? queueMaxParallelApps : defaultMaxParallelApps);
{code}

 * The same can be said for getMaxParallelAppsForUser.
 * I think the if block in CapacityScheduler which is separating the runnable 
and nonRunnable task tracking could be moved to a method in maxRunningEnforcer, 
as the attempt parameter is passed either way. There could be a trackApp which 
decides if the app is runnable or not. It would make the CS code a bit easier 
to read.

> Support max running app logic for CapacityScheduler
> ---------------------------------------------------
>
>                 Key: YARN-9930
>                 URL: https://issues.apache.org/jira/browse/YARN-9930
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: capacity scheduler, capacityscheduler
>    Affects Versions: 3.1.0, 3.1.1
>            Reporter: zhoukang
>            Assignee: Peter Bacsko
>            Priority: Major
>         Attachments: YARN-9930-001.patch, YARN-9930-002.patch, 
> YARN-9930-003.patch, YARN-9930-004.patch, YARN-9930-POC01.patch, 
> YARN-9930-POC02.patch, YARN-9930-POC03.patch, YARN-9930-POC04.patch, 
> YARN-9930-POC05.patch, screenshot-1.png
>
>
> In FairScheduler, there has limitation for max running which will let 
> application pending.
> But in CapacityScheduler there has no feature like max running app.Only got 
> max app,and jobs will be rejected directly on client.
> This jira i want to implement this semantic for CapacityScheduler.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to