You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/07/30 12:53:49 UTC
[GitHub] [flink] wangyang0918 commented on a change in pull request #9106:
[FLINK-13184][yarn] Support launching task executors with multi-thread on
YARN.
wangyang0918 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_r308663264
##########
File path: flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
##########
@@ -186,6 +197,11 @@ public YarnResourceManager(
this.slotsPerWorker = updateTaskManagerConfigAndCreateWorkerSlotProfiles(flinkConfig, defaultTaskManagerMemoryMB, numberOfTaskSlots);
setFailUnfulfillableRequest(true);
+
+ this.startContainerExecutor = new ThreadPoolExecutor(0, flinkConfig.getInteger(YarnConfigOptions.CONTAINER_LAUNCHER_NUM_MAX),
+ 60L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), new ThreadFactoryBuilder()
+ .setNameFormat("ContainerLauncher #%d")
+ .build());
Review comment:
The default size of LinkedBlockingQueue is Integer.MAX_VALUE. Only when the queue is full, the new threads will be started. Please refer to the java doc of ThreadPoolExecutor. So i think we should use the FixedThreadPool instead.
Also, the executor service need to be shut down in postStop().
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services