brumi1024 commented on code in PR #3618:
URL: https://github.com/apache/hadoop/pull/3618#discussion_r1179074067


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerAllocation.java:
##########
@@ -1392,4 +1412,15 @@ public void 
testContainerRejectionWhenAskBeyondDynamicMax()
 
     rm1.close();
   }
+
+  private CapacityScheduler getCapacityScheduler(MockRM rm1, int memoryGb) {

Review Comment:
   The name getCapacityScheduler is misleading. A getter shouldn't set up 
clusterResources or init the queue structure. I would prefer if there was a 
separate getter and a mockCS reinit method, which sets up the resources/queues. 



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestContainerAllocation.java:
##########
@@ -169,6 +172,7 @@ public void testContainerTokenGeneratedOnPullRequest() 
throws Exception {
     MockRM rm1 = new MockRM(conf);
     rm1.start();
     MockNM nm1 = rm1.registerNode("127.0.0.1:1234", 8000);
+    CapacityScheduler cs = getCapacityScheduler(rm1, 8);

Review Comment:
   CS object seems to be unused. To avoid further confusion I would separate 
the getter and the setup method.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to