azagrebin commented on a change in pull request #9105: 
[FLINK-13241][Yarn/Mesos] Fix Yarn/MesosResourceManager setting managed memory 
size into wrong configuration instance.
URL: https://github.com/apache/flink/pull/9105#discussion_r304898807
 
 

 ##########
 File path: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnConfigurationITCase.java
 ##########
 @@ -187,6 +190,12 @@ public void testFlinkContainerMemory() throws Exception {
                                        assertThat(
                                                (double) 
taskManagerInfo.getHardwareDescription().getSizeOfJvmHeap() / (double) 
expectedHeadSize,
                                                is(closeTo(1.0, 0.15)));
+
+                                       final int defaultTaskManagerMemoryMB = 
ConfigurationUtils.getTaskManagerHeapMemory(configuration).getMebiBytes();
+                                       
YarnResourceManager.updateTaskManagerConfigAndCreateWorkerSlotProfiles(configuration,
 defaultTaskManagerMemoryMB, slotsPerTaskManager);
+                                       final int expectedManagedMemoryMB = 
MemorySize.parse(configuration.getString(TaskManagerOptions.MANAGED_MEMORY_SIZE)).getMebiBytes();
 
 Review comment:
   I would suggest to calculate `expectedManagedMemoryMB` in a separate 
function, ideally w/o implicit modification of original `configuration`. Now it 
does not matter, just not to spoil something potentially added later.

----------------------------------------------------------------
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