YARN-2070. Made DistributedShell publish the short user name to the timeline server. Contributed by Robert Kanter.

svn merge --ignore-ancestry -c 1617837 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1617839 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhijie Shen 2014-08-13 21:09:07 +00:00
parent bed05477bd
commit ce1df05977
2 changed files with 9 additions and 6 deletions

View File

@ -172,6 +172,9 @@ Release 2.6.0 - UNRELEASED
YARN-2361. RMAppAttempt state machine entries for KILLED state has duplicate
event entries. (Zhihai Xu via kasha)
YARN-2070. Made DistributedShell publish the short user name to the timeline
server. (Robert Kanter via zjshen)
Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -1054,8 +1054,8 @@ public class ApplicationMaster {
TimelineEntity entity = new TimelineEntity();
entity.setEntityId(container.getId().toString());
entity.setEntityType(DSEntity.DS_CONTAINER.toString());
entity.addPrimaryFilter("user", UserGroupInformation.getCurrentUser()
.toString());
entity.addPrimaryFilter("user",
UserGroupInformation.getCurrentUser().getShortUserName());
TimelineEvent event = new TimelineEvent();
event.setTimestamp(System.currentTimeMillis());
event.setEventType(DSEvent.DS_CONTAINER_START.toString());
@ -1071,8 +1071,8 @@ public class ApplicationMaster {
TimelineEntity entity = new TimelineEntity();
entity.setEntityId(container.getContainerId().toString());
entity.setEntityType(DSEntity.DS_CONTAINER.toString());
entity.addPrimaryFilter("user", UserGroupInformation.getCurrentUser()
.toString());
entity.addPrimaryFilter("user",
UserGroupInformation.getCurrentUser().getShortUserName());
TimelineEvent event = new TimelineEvent();
event.setTimestamp(System.currentTimeMillis());
event.setEventType(DSEvent.DS_CONTAINER_END.toString());
@ -1089,8 +1089,8 @@ public class ApplicationMaster {
TimelineEntity entity = new TimelineEntity();
entity.setEntityId(appAttemptId);
entity.setEntityType(DSEntity.DS_APP_ATTEMPT.toString());
entity.addPrimaryFilter("user", UserGroupInformation.getCurrentUser()
.toString());
entity.addPrimaryFilter("user",
UserGroupInformation.getCurrentUser().getShortUserName());
TimelineEvent event = new TimelineEvent();
event.setEventType(appEvent.toString());
event.setTimestamp(System.currentTimeMillis());