[
https://issues.apache.org/jira/browse/FLINK-9410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492459#comment-16492459
]
ASF GitHub Bot commented on FLINK-9410:
---------------------------------------
Github user sihuazhou commented on a diff in the pull request:
https://github.com/apache/flink/pull/6087#discussion_r191162993
--- Diff:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java ---
@@ -212,13 +214,12 @@ private void getContainersFromPreviousAttempts(final
RegisterApplicationMasterRe
}
}
- protected NMClient createAndStartNodeManagerClient(YarnConfiguration
yarnConfiguration) {
- // create the client to communicate with the node managers
- NMClient nodeManagerClient = NMClient.createNMClient();
- nodeManagerClient.init(yarnConfiguration);
- nodeManagerClient.start();
- nodeManagerClient.cleanupRunningContainersOnStop(true);
- return nodeManagerClient;
+ protected NMClientAsync
createAndStartNodeManagerClient(YarnConfiguration yarnConfiguration) {
+ // create the client to communicate with the node managers.
+ NMClientAsync nodeManagerAsyncClient =
NMClientAsync.createNMClientAsync(new NMClientAsyncCallbackHandler());
+ nodeManagerAsyncClient.init(yarnConfiguration);
+ nodeManagerAsyncClient.start();
--- End diff --
Maybe we should also call this
`nodeManagerClient.getClient().cleanupRunningContainersOnStop(true);`.
> Replace NMClient with NMClientAsync in YarnResourceManager
> ----------------------------------------------------------
>
> Key: FLINK-9410
> URL: https://issues.apache.org/jira/browse/FLINK-9410
> Project: Flink
> Issue Type: Improvement
> Components: Distributed Coordination
> Affects Versions: 1.5.0, 1.6.0
> Reporter: Till Rohrmann
> Assignee: mingleizhang
> Priority: Critical
> Fix For: 1.6.0
>
>
> Currently, the {{YarnResourceManager}} uses the synchronous {{NMClient}}
> which is called from within the main thread of the {{ResourceManager}}. Since
> these operations are blocking, we should replace the client with the
> {{NMClientAsync}} and make the calls non blocking.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)