hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sj...@apache.org
Subject [33/50] [abbrv] hadoop git commit: YARN-5210 NPE in Distributed Shell while publishing DS_CONTAINER_START event (Varun Saxena via Vrushali C)
Date Sun, 10 Jul 2016 15:51:24 GMT
YARN-5210 NPE in Distributed Shell while publishing DS_CONTAINER_START event (Varun Saxena
via Vrushali C)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3832795e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3832795e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3832795e

Branch: refs/heads/YARN-2928
Commit: 3832795e3c3ea9dcf5c70f348f894882b2ace98e
Parents: c650200
Author: Vrushali Channapattan <vrushali@apache.org>
Authored: Thu Jun 9 11:36:52 2016 -0700
Committer: Sangjin Lee <sjlee@apache.org>
Committed: Sun Jul 10 08:46:02 2016 -0700

----------------------------------------------------------------------
 .../distributedshell/ApplicationMaster.java     | 23 ++++++++++----------
 1 file changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3832795e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
index b22e1b2..2e34ef8 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
@@ -979,16 +979,13 @@ public class ApplicationMaster {
       }
       Container container = containers.get(containerId);
       if (container != null) {
-        applicationMaster.nmClientAsync.getContainerStatusAsync(containerId, container.getNodeId());
+        applicationMaster.nmClientAsync.getContainerStatusAsync(
+            containerId, container.getNodeId());
       }
       if(applicationMaster.timelineClient != null) {
-        applicationMaster.publishContainerStartEvent(
-            applicationMaster.timelineClient, container,
-            applicationMaster.domainId, applicationMaster.appSubmitterUgi);
-
         if (applicationMaster.timelineServiceV2) {
-            applicationMaster.publishContainerStartEventOnTimelineServiceV2(
-                container);
+          applicationMaster.publishContainerStartEventOnTimelineServiceV2(
+              container);
         } else {
           applicationMaster.publishContainerStartEvent(
             applicationMaster.timelineClient, container,
@@ -1355,12 +1352,13 @@ public class ApplicationMaster {
         new org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity();
     entity.setId(container.getId().toString());
     entity.setType(DSEntity.DS_CONTAINER.toString());
-    //entity.setDomainId(domainId);
+    long ts = System.currentTimeMillis();
+    entity.setCreatedTime(ts);
     entity.addInfo("user", appSubmitterUgi.getShortUserName());
 
     org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent event =
         new org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent();
-    event.setTimestamp(System.currentTimeMillis());
+    event.setTimestamp(ts);
     event.setId(DSEvent.DS_CONTAINER_START.toString());
     event.addInfo("Node", container.getNodeId().toString());
     event.addInfo("Resources", container.getResource().toString());
@@ -1418,12 +1416,15 @@ public class ApplicationMaster {
         new org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity();
     entity.setId(appAttemptID.toString());
     entity.setType(DSEntity.DS_APP_ATTEMPT.toString());
-    //entity.setDomainId(domainId);
+    long ts = System.currentTimeMillis();
+    if (appEvent == DSEvent.DS_APP_ATTEMPT_START) {
+      entity.setCreatedTime(ts);
+    }
     entity.addInfo("user", appSubmitterUgi.getShortUserName());
     org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent event =
         new org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent();
     event.setId(appEvent.toString());
-    event.setTimestamp(System.currentTimeMillis());
+    event.setTimestamp(ts);
     entity.addEvent(event);
 
     try {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message