From bb95a5e18f3c41a2feeee93071b883e88c8ed7e7 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Thu, 12 May 2016 20:28:36 +0000 Subject: [PATCH] YARN-5053. More informative diagnostics when applications killed by a user. Contributed by Eric Badger (cherry picked from commit 013000fbc2081c2b7e78b790fc6d847de92b9384) --- .../yarn/server/resourcemanager/ClientRMService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java index 550b96b5e26..b8d85b20799 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java @@ -750,9 +750,14 @@ public class ClientRMService extends AbstractService implements return KillApplicationResponse.newInstance(true); } + String message = "Kill application " + applicationId + + " received from " + callerUGI; + if(null != Server.getRemoteAddress()) { + message += " at " + Server.getRemoteAddress(); + } this.rmContext.getDispatcher().getEventHandler().handle( new RMAppEvent(applicationId, RMAppEventType.KILL, - "Application killed by user.")); + message)); // For UnmanagedAMs, return true so they don't retry return KillApplicationResponse.newInstance(