walterddr commented on a change in pull request #9106: [FLINK-13184][yarn]
Support launching task executors with multi-thread on YARN.
URL: https://github.com/apache/flink/pull/9106#discussion_r326907587
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
##########
@@ -185,6 +196,12 @@ public YarnResourceManager(
this.resource =
Resource.newInstance(defaultTaskManagerMemoryMB, defaultCpus);
this.slotsPerWorker = createWorkerSlotProfiles(flinkConfig);
+
+ final int containerLauncherNum =
flinkConfig.getInteger(YarnConfigOptions.CONTAINER_LAUNCHER_NUM_MAX);
+ this.startContainerExecutor = new
ThreadPoolExecutor(containerLauncherNum, containerLauncherNum,
Review comment:
+1. according to the
[Javadoc](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html):
`ExecutorService` can "provides methods to manage termination and methods that
can produce a {@link Future} for tracking progress of one or more asynchronous
tasks." seems to be a better fit for the purpose.
----------------------------------------------------------------
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