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

Karthik Kambatla commented on YARN-2155:
----------------------------------------

Good catch [~octo47]. Thanks for fixing it, Wei.

The fix looks good to me. +1. 

> FairScheduler: Incorrect check when trigger a preemption
> --------------------------------------------------------
>
>                 Key: YARN-2155
>                 URL: https://issues.apache.org/jira/browse/YARN-2155
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Wei Yan
>            Assignee: Wei Yan
>         Attachments: YARN-2155.patch
>
>
> {code}
> private boolean shouldAttemptPreemption() {
>   if (preemptionEnabled) {
>     return (preemptionUtilizationThreshold < Math.max(
>         (float) rootMetrics.getAvailableMB() / clusterResource.getMemory(),
>         (float) rootMetrics.getAvailableVirtualCores() /
>             clusterResource.getVirtualCores()));
>   }
>   return false;
> }
> {code}
> preemptionUtilizationThreshould should be compared with allocatedResource 
> instead of availableResource.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to