zentol commented on a change in pull request #10034: [FLINK-14400] Shrink scope 
of MemoryManager from TaskExecutor to slot
URL: https://github.com/apache/flink/pull/10034#discussion_r341064902
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
 ##########
 @@ -302,6 +299,30 @@ public static TaskManagerServices fromConfiguration(
                        taskEventDispatcher);
        }
 
+       private static TaskSlotTable createTaskSlotTable(
+                       int numberOfSlots,
+                       long managedMemorySize,
+                       long timerServiceShutdownTimeout) {
+               final List<ResourceProfile> resourceProfiles =
+                       Collections.nCopies(numberOfSlots, 
computeSlotResourceProfile(numberOfSlots, managedMemorySize));
+               final TimerService<AllocationID> timerService = new 
TimerService<>(
+                       new ScheduledThreadPoolExecutor(1),
+                       timerServiceShutdownTimeout);
+               return new 
TaskSlotTable(createTaskSlotsFromResources(resourceProfiles), timerService);
+       }
+
+       public static List<TaskSlot> 
createTaskSlotsFromResources(Collection<ResourceProfile> resourceProfiles) {
 
 Review comment:
   why is this public?

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