azagrebin commented on a change in pull request #10161: [FLINK-13986][runtime] 
Clean up legacy code for FLIP-49.
URL: https://github.com/apache/flink/pull/10161#discussion_r347783033
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ##########
 @@ -1207,7 +1207,7 @@ protected int getNumberRequiredTaskManagerSlots() {
 
        public static Collection<ResourceProfile> 
createWorkerSlotProfiles(Configuration config) {
                final int numSlots = 
config.getInteger(TaskManagerOptions.NUM_TASK_SLOTS);
-               final long managedMemoryBytes = 
MemorySize.parse(config.getString(TaskManagerOptions.LEGACY_MANAGED_MEMORY_SIZE)).getBytes();
+               final long managedMemoryBytes = 
MemorySize.parse(config.getString(TaskManagerOptions.MANAGED_MEMORY_SIZE, 
"0b")).getBytes();
 
 Review comment:
   We should rather adjust `TaskManagerServices#computeSlotResourceProfile` to 
set both types of memory from `TaskExecutorResourceSpec` in 
`createWorkerSlotProfiles` instead of hacking through 
`ActiveResourceManagerFactory#createActiveResourceManagerConfiguration`. Then 
we can remove `ActiveResourceManagerFactory(Test)` as redundant in a hotfix.
   #10034 already introduces a version of 
`TaskManagerServices#computeSlotResourceProfile` for both types of memory: 
https://github.com/apache/flink/pull/10034/commits/981460272198a80a600e5e353fc483ba087dd59b#diff-4c3b0783838c1958e8727df5117e7910R506

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