bibinchundatt commented on a change in pull request #3646: URL: https://github.com/apache/hadoop/pull/3646#discussion_r750070889
########## File path: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNodeImpl.java ########## @@ -464,6 +466,11 @@ public Resource getTotalCapability() { return this.totalCapability; } + @Override Review comment: We need to also update the data when we addNodeTransition ########## File path: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMNodeTransitions.java ########## @@ -358,6 +375,119 @@ public void testContainerUpdate() throws InterruptedException{ .getContainerId()); } + /** + * Tests that allocated container resources are counted correctly in + * {@link org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode} + * upon a node update. Resources should be counted for both GUARANTEED + * and OPPORTUNISTIC containers. + */ + @Test (timeout = 5000) + public void testAllocatedContainerUpdate() { + NodeStatus mockNodeStatus = createMockNodeStatus(); + //Start the node + node.handle(new RMNodeStartedEvent(null, null, null, mockNodeStatus)); Review comment: Update the testcase with addNode resource update transition too. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org