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

Ishai Menache commented on YARN-4525:
-------------------------------------

We suggest the following fix: 
current code:
a = a.headMap(end, true);

fix:
if (end < a.lastKey()) {
        a = a.headMap(end, true);
}

Thanks to [~jyaniv] for helping debug this issue.


> Bug in RLESparseResourceAllocation.getRangeOverlapping(...)
> -----------------------------------------------------------
>
>                 Key: YARN-4525
>                 URL: https://issues.apache.org/jira/browse/YARN-4525
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ishai Menache
>            Assignee: Carlo Curino
>
> One of our tests detected a corner case in getRangeOverlapping: When the 
> RLESparseResourceAllocation object is a result of a merge operation, the 
> underlying map is a "view" within some range. If  'end' is outside that 
> range, headMap(..) throws an uncaught exception.



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

Reply via email to