azagrebin 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_r352199731
##########
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:
could you move the whole `createTaskSlotsFromResources` into `TaskSlotTable`?
----------------------------------------------------------------
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