xintongsong commented on a change in pull request #10330: 
[FLINK-14189][runtime] Extend TaskExecutor to support dynamic slot allocation
URL: https://github.com/apache/flink/pull/10330#discussion_r352565982
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
 ##########
 @@ -296,22 +291,11 @@ private static TaskSlotTable createTaskSlotTable(
                final long timerServiceShutdownTimeout,
                final int pageSize) {
                final int numberOfSlots = (int) (1.0 / 
taskExecutorResourceSpec.getDefaultSlotFraction());
-               final List<ResourceProfile> resourceProfiles =
-                       Collections.nCopies(numberOfSlots,
-                               
TaskExecutorResourceUtils.generateDefaultSlotResourceProfile(taskExecutorResourceSpec));
+               final ResourceProfile resourceProfile = 
TaskExecutorResourceUtils.generateDefaultSlotResourceProfile(taskExecutorResourceSpec);
                final TimerService<AllocationID> timerService = new 
TimerService<>(
                        new ScheduledThreadPoolExecutor(1),
                        timerServiceShutdownTimeout);
-               return new 
TaskSlotTable(createTaskSlotsFromResources(resourceProfiles, pageSize), 
timerService);
-       }
-
-       private static List<TaskSlot> createTaskSlotsFromResources(
 
 Review comment:
   As discussed offline, soon in later commits we no longer create the entire 
list of `TaskSlot` when creating `TaskSlotTable`. So there's no need to move 
the whole `createTaskSlotsFromResources` because it will soon be removed anyway.

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