tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject [45/50] [abbrv] tez git commit: TEZ-1774. AppLaunched event for Timeline does not have start time set. (hitesh)
Date Mon, 17 Nov 2014 19:22:54 GMT
TEZ-1774. AppLaunched event for Timeline does not have start time set. (hitesh)


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

Branch: refs/heads/TEZ-8
Commit: f152a7f3bcca82a343b759c2921dbc8d93aaf175
Parents: 0daf2ba
Author: Hitesh Shah <hitesh@apache.org>
Authored: Thu Nov 13 11:01:44 2014 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Thu Nov 13 11:01:44 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                            |  1 +
 .../history/logging/ats/ATSHistoryLoggingService.java  | 13 +++++++++----
 .../logging/ats/HistoryEventTimelineConversion.java    |  4 ++++
 .../ats/TestHistoryEventTimelineConversion.java        |  4 ++++
 4 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/f152a7f3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index aa7d74d..e73ab9b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,6 +10,7 @@ ALL CHANGES:
   TEZ-1738. Tez tfile parser for log parsing
   TEZ-1627. Remove OUTPUT_CONSUMABLE and related Event in TaskAttemptImpl
   TEZ-1736. Add support for Inputs/Outputs in runtime-library to generate history text data.
+  TEZ-1774. AppLaunched event for Timeline does not have start time set.
 
 Release 0.5.3: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/f152a7f3/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java
b/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java
index 99cb441..ce09a3f 100644
--- a/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java
+++ b/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java
@@ -257,10 +257,15 @@ public class ATSHistoryLoggingService extends HistoryLoggingService
{
           timelineClient.putEntities(entities);
       if (response != null
         && !response.getErrors().isEmpty()) {
-        TimelinePutError err = response.getErrors().get(0);
-        if (err.getErrorCode() != 0) {
-          LOG.warn("Could not post history events to ATS"
-              + ", atsPutError=" + err.getErrorCode());
+        int count = response.getErrors().size();
+        for (int i = 0; i < count; ++i) {
+          TimelinePutError err = response.getErrors().get(i);
+          if (err.getErrorCode() != 0) {
+            LOG.warn("Could not post history event to ATS"
+                + ", atsPutError=" + err.getErrorCode()
+                + ", entityId=" + entities[i].getEntityId()
+                + ", eventType=" + events.get(i).getHistoryEvent().getEventType());
+          }
         }
       }
       // Do nothing additional, ATS client library should handle throttling

http://git-wip-us.apache.org/repos/asf/tez/blob/f152a7f3/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/HistoryEventTimelineConversion.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/HistoryEventTimelineConversion.java
b/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/HistoryEventTimelineConversion.java
index 865915e..4b6d648 100644
--- a/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/HistoryEventTimelineConversion.java
+++ b/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/HistoryEventTimelineConversion.java
@@ -142,6 +142,8 @@ public class HistoryEventTimelineConversion {
     atsEntity.addOtherInfo(ATSConstants.CONFIG,
         DAGUtils.convertConfigurationToATSMap(event.getConf()));
 
+    atsEntity.setStartTime(event.getLaunchTime());
+
     return atsEntity;
   }
 
@@ -530,6 +532,8 @@ public class HistoryEventTimelineConversion {
     initEvt.setTimestamp(event.getInitedTime());
     atsEntity.addEvent(initEvt);
 
+    atsEntity.setStartTime(event.getInitedTime());
+
     atsEntity.addOtherInfo(ATSConstants.VERTEX_NAME, event.getVertexName());
     atsEntity.addOtherInfo(ATSConstants.INIT_REQUESTED_TIME, event.getInitRequestedTime());
     atsEntity.addOtherInfo(ATSConstants.INIT_TIME, event.getInitedTime());

http://git-wip-us.apache.org/repos/asf/tez/blob/f152a7f3/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
b/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
index a40aa74..ce47820 100644
--- a/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
+++ b/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
@@ -205,6 +205,8 @@ public class TestHistoryEventTimelineConversion {
 
     TimelineEntity timelineEntity = HistoryEventTimelineConversion.convertToTimelineEntity(event);
 
+    Assert.assertEquals(launchTime, timelineEntity.getStartTime().longValue());
+
     Assert.assertEquals(EntityTypes.TEZ_APPLICATION.name(), timelineEntity.getEntityType());
     Assert.assertEquals("tez_" + applicationId.toString(), timelineEntity.getEntityId());
 
@@ -405,6 +407,8 @@ public class TestHistoryEventTimelineConversion {
     Assert.assertEquals(EntityTypes.TEZ_VERTEX_ID.name(), timelineEntity.getEntityType());
     Assert.assertEquals(tezVertexID.toString(), timelineEntity.getEntityId());
 
+    Assert.assertEquals(initedTime, timelineEntity.getStartTime().longValue());
+
     Assert.assertEquals(1, timelineEntity.getRelatedEntities().size());
     Assert.assertTrue(
         timelineEntity.getRelatedEntities().get(EntityTypes.TEZ_DAG_ID.name()).contains(


Mime
View raw message