This is an automated email from the ASF dual-hosted git repository. slfan1989 pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new 1f640aa02a2 YARN-11787. [Federation] Enhance Exception Handling in FederationClientInterceptor#forceKillApplication. (#7465) Contributed by Shilun Fan. 1f640aa02a2 is described below commit 1f640aa02a212b7328c7be91345987d11a7474f5 Author: slfan1989 <55643692+slfan1...@users.noreply.github.com> AuthorDate: Fri Mar 21 09:23:41 2025 +0800 YARN-11787. [Federation] Enhance Exception Handling in FederationClientInterceptor#forceKillApplication. (#7465) Contributed by Shilun Fan. Co-authored-by: Hualong Zhang <hualon...@hotmail.com> Signed-off-by: Shilun Fan <slfan1...@apache.org> --- .../server/router/clientrm/FederationClientInterceptor.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java index e507f1497e7..e6a68ee6dea 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java @@ -667,9 +667,15 @@ public KillApplicationResponse forceKillApplication( // If kill home sub-cluster application is successful, // we will try to kill the same application in other sub-clusters. if (response != null) { - ClientMethod remoteMethod = new ClientMethod("forceKillApplication", - new Class[]{KillApplicationRequest.class}, new Object[]{request}); - invokeConcurrent(remoteMethod, KillApplicationResponse.class, subClusterId); + try { + ClientMethod remoteMethod = new ClientMethod("forceKillApplication", + new Class[]{KillApplicationRequest.class}, new Object[]{request}); + invokeConcurrent(remoteMethod, KillApplicationResponse.class, subClusterId); + } catch (YarnException e) { + // We cannot confirm whether the application exists in other sub-clusters, + // so this method may throw an error, which we should ignore. + LOG.warn("The execution of forceKillApplication failed in the sub-cluster.", e); + } } } catch (Exception e) { routerMetrics.incrAppsFailedKilled(); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org