gaoyunhaii commented on a change in pull request #8704: [FLINK-12812][runtime] 
Set resource profiles for task slots
URL: https://github.com/apache/flink/pull/8704#discussion_r294170707
 
 

 ##########
 File path: 
flink-yarn/src/test/java/org/apache/flink/yarn/YarnResourceManagerTest.java
 ##########
 @@ -522,4 +534,68 @@ public void testOnContainerCompleted() throws Exception {
                        });
                }};
        }
+
+       /**
+        * Test that RM and TM calculate same slot resource profile.
+        * @throws Exception
+        */
+       @Test
+       public void testCreateSlotsPerWorker() throws Exception {
+               testCreateSlotsPerWorker(flinkConfig, Resource.newInstance(500, 
100));
+
+               Configuration config1 = new Configuration();
+               config1.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, 5);
+               testCreateSlotsPerWorker(config1, Resource.newInstance(1000, 
10));
+
+               Configuration config2 = new Configuration();
+               config2.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, 
"789m");
+               testCreateSlotsPerWorker(config2,  Resource.newInstance(800, 
50));
+
+               Configuration config3 = new Configuration();
+               config3.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, 
"300m");
+               config3.setBoolean(TaskManagerOptions.MEMORY_OFF_HEAP, true);
+               testCreateSlotsPerWorker(config3,  Resource.newInstance(2000, 
60));
+
+               Configuration config4 = new Configuration();
+               
config4.setInteger(NettyShuffleEnvironmentOptions.NETWORK_NUM_BUFFERS, 50);
 
 Review comment:
   I think it may be better to use the new 
NETWORK_BUFFERS_MEMORY_MIN/NETWORK_BUFFERS_MEMORY_MAX configuration instead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to