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

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
 ##########
 @@ -1191,8 +1197,32 @@ protected int getNumberRequiredTaskManagerSlots() {
        //  Helper methods
        // 
------------------------------------------------------------------------
 
-       protected static Collection<ResourceProfile> createSlotsPerWorker(int 
numSlots) {
-               return Collections.nCopies(numSlots, ResourceProfile.ANY);
+       @VisibleForTesting
+       public static Collection<ResourceProfile> 
createSlotsPerWorker(Configuration config, long totalMemoryMB, int numSlots) {
+               final long cutoffMB = 
ContaineredTaskManagerParameters.calculateCutoffMB(config, totalMemoryMB);
+
+               final long networkMB = 
NettyShuffleEnvironmentConfiguration.calculateNetworkBufferMemory(
 
 Review comment:
   This is assuming that the TaskManager ran with the same config as the 
resource manager and that it follows the exact same logic.
   Let's find another way to do this, this is too fragile and assuming things 
that are mostly true but not always.

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