YARN-5053. More informative diagnostics when applications killed by a user. Contributed by Eric Badger

(cherry picked from commit 013000fbc2)
This commit is contained in:
Jason Lowe 2016-05-12 20:28:36 +00:00
parent 1370dfc775
commit bb95a5e18f
1 changed files with 6 additions and 1 deletions

View File

@ -750,9 +750,14 @@ public class ClientRMService extends AbstractService implements
return KillApplicationResponse.newInstance(true); 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( this.rmContext.getDispatcher().getEventHandler().handle(
new RMAppEvent(applicationId, RMAppEventType.KILL, new RMAppEvent(applicationId, RMAppEventType.KILL,
"Application killed by user.")); message));
// For UnmanagedAMs, return true so they don't retry // For UnmanagedAMs, return true so they don't retry
return KillApplicationResponse.newInstance( return KillApplicationResponse.newInstance(