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

Ashwin Shankar commented on YARN-2394:
--------------------------------------

Also, a subjective opinion(feel free to ignore the comment) - In the code 
below, instead of passing a boolean, can we have the original 
isStarvedFor(Fair|Min)Share which seems more readable to me and put the last 
two lines of isStarved(boolean) into another method if you 
think that would be redundant between isStarvedFor(Fair|Min)Share ?
{code:title=FSLeafQueue}
boolean isStarved(boolean checkMinShare) {
    Resource share = checkMinShare ? getMinShare() :
        Resources.multiply(getFairShare(), getFairSharePreemptionThreshold());

    Resource desiredShare = Resources.min(scheduler.getResourceCalculator(),
        scheduler.getClusterResource(), share, getDemand());
    return Resources.lessThan(scheduler.getResourceCalculator(),
        scheduler.getClusterResource(), getResourceUsage(), desiredShare);
  }
{code}

> FairScheduler: Configure fairSharePreemptionThreshold per queue
> ---------------------------------------------------------------
>
>                 Key: YARN-2394
>                 URL: https://issues.apache.org/jira/browse/YARN-2394
>             Project: Hadoop YARN
>          Issue Type: New Feature
>          Components: fairscheduler
>            Reporter: Ashwin Shankar
>            Assignee: Wei Yan
>         Attachments: YARN-2394-1.patch, YARN-2394-2.patch, YARN-2394-3.patch, 
> YARN-2394-4.patch, YARN-2394-5.patch
>
>
> Preemption based on fair share starvation happens when usage of a queue is 
> less than 50% of its fair share. This 50% is hardcoded. We'd like to make 
> this configurable on a per queue basis, so that we can choose the threshold 
> at which we want to preempt. Calling this config 
> "fairSharePreemptionThreshold". 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to