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

Karthik Kambatla commented on YARN-1241:
----------------------------------------

Few comments, mostly nits:
# A couple of lines in MaxRunningAppsEnforcer are over 80 chars.
# doc comment looks incomplete:
{code}
  /**
   * Traverses the queue hierarchy under the given queue to find all
   * applications that
   */
  private void gatherPossiblyRunnableAppLists(FSQueue queue,
      List<List<AppSchedulable>> appLists) {
{code}
# May be, can add doc for track*RunnableApps()
# Need to doc the need for and the approach for MultiListStartTimeIterator
# MultiListStartTimeIterator#remove() should throw 
UnsupportedOperationException if remove is not to be used
# Probably inconsequential, should queue.addApp be after tracking the app 
below: 
{code}
    boolean runnable = maxRunningEnforcer.canAppBeRunnable(queue, user);
    queue.addApp(schedulerApp, runnable);
    if (runnable) {
      maxRunningEnforcer.trackRunnableApp(schedulerApp);
    } else {
      maxRunningEnforcer.trackNonRunnableApp(schedulerApp);
    }
{code}
# When removing non-runnable app, shouldn't we need to update the corresponding 
count in MaxRunningAppsEnforcer:
{code}
    boolean wasRunnable = queue.removeApp(application);

    if (wasRunnable) {
      maxRunningEnforcer.updateRunnabilityOnAppRemoval(application);
    }
{code}
# Would be nice to have tests - 
TestMaxRunningAppsEnforcer#removeDoesnotEnableAnyApp and a test in 
TestFairScheduler for the count of non-runnable apps.
# Not particular on it, but would be nice to move 
TestCapacityScheduler#verifyConcurrentAccessOnApplications out of 
TestCapacityScheduler - may be SchedulerTestUtils or something?

> In Fair Scheduler maxRunningApps does not work for non-leaf queues
> ------------------------------------------------------------------
>
>                 Key: YARN-1241
>                 URL: https://issues.apache.org/jira/browse/YARN-1241
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.1.0-beta
>            Reporter: Sandy Ryza
>            Assignee: Sandy Ryza
>         Attachments: YARN-1241-1.patch, YARN-1241-2.patch, YARN-1241-3.patch, 
> YARN-1241-4.patch, YARN-1241-5.patch, YARN-1241-6.patch, YARN-1241-7.patch, 
> YARN-1241-8.patch, YARN-1241-9.patch, YARN-1241.patch
>
>
> Setting the maxRunningApps property on a parent queue should make it that the 
> sum of apps in all subqueues can't exceed it



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to