You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Takashi Ohnishi (JIRA)" <ji...@apache.org> on 2016/01/27 05:54:39 UTC

[jira] [Commented] (YARN-4572) TestCapacityScheduler#testHeadRoomCalculationWithDRC failing

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

Takashi Ohnishi commented on YARN-4572:
---------------------------------------

I could not reproduce this, but from the error message I think this was caused by early calling of getHeadroom() before the actual container allocation.

How about adding the check like below?

{code}

     fiCaApp1.updateResourceRequests(Collections.singletonList(
         TestUtils.createResourceRequest(ResourceRequest.ANY, 10*GB, 1, true,
             u0Priority, recordFactory)));
+    for (RMContainer con: fiCaApp1.getLiveContainers()) {
+      rm.waitForContainerState(con.getContainerId(), RMContainerState.ALLOCATED);
+    }
     cs.handle(new NodeUpdateSchedulerEvent(node));
     cs.handle(new NodeUpdateSchedulerEvent(node2));
     assertEquals(6*GB, fiCaApp1.getHeadroom().getMemory());
{code}

I will attach a patch.

> TestCapacityScheduler#testHeadRoomCalculationWithDRC failing
> ------------------------------------------------------------
>
>                 Key: YARN-4572
>                 URL: https://issues.apache.org/jira/browse/YARN-4572
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>            Reporter: Bibin A Chundatt
>
> {noformat}
> Tests run: 46, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 127.996 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacityScheduler
> testHeadRoomCalculationWithDRC(org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacityScheduler)  Time elapsed: 0.189 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<6144> but was:<16384>
> 	at org.junit.Assert.fail(Assert.java:88)
> 	at org.junit.Assert.failNotEquals(Assert.java:743)
> 	at org.junit.Assert.assertEquals(Assert.java:118)
> 	at org.junit.Assert.assertEquals(Assert.java:555)
> 	at org.junit.Assert.assertEquals(Assert.java:542)
> 	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacityScheduler.testHeadRoomCalculationWithDRC(TestCapacityScheduler.java:3041)
> {noformat}
> https://builds.apache.org/job/PreCommit-YARN-Build/10204/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_66.txt
> https://builds.apache.org/job/PreCommit-YARN-Build/10204/testReport/
> Failed in jdk8 locally the same is passing



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