[ https://issues.apache.org/jira/browse/YARN-2454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14110404#comment-14110404 ]
Tsuyoshi OZAWA commented on YARN-2454: -------------------------------------- sorry, testCompareToWithNoneResource is wrong. A fixed version is as follows: {code} @Test(timeout=1000) public void testCompareToWithNoneResource() { assertTrue(Resources.none().compareTo(createResource(0, 0)) == 0); assertTrue(Resources.none().compareTo( createResource(1, 0)) > 0); assertTrue(Resources.none().compareTo( createResource(0, 1)) > 0); } {code} > The function compareTo of variable UNBOUNDED in > org.apache.hadoop.yarn.util.resource.Resources is definited wrong. > ------------------------------------------------------------------------------------------------------------------ > > Key: YARN-2454 > URL: https://issues.apache.org/jira/browse/YARN-2454 > Project: Hadoop YARN > Issue Type: Bug > Affects Versions: 2.4.0, 2.5.0, 2.4.1 > Reporter: Xu Yang > Attachments: YARN-2454-patch.diff > > > The variable UNBOUNDED implement the abstract class Resources, and override > the function compareTo. But there is something wrong in this function. We > should not compare resources with zero as the same as the variable NONE. We > should change 0 to Integer.MAX_VALUE. -- This message was sent by Atlassian JIRA (v6.2#6252)