tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject git commit: TEZ-94. Add diagnostics to history events.
Date Tue, 07 May 2013 22:15:36 GMT
Updated Branches:
  refs/heads/TEZ-1 b4698e8ed -> 42bbadf85


TEZ-94. Add diagnostics to history events.


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

Branch: refs/heads/TEZ-1
Commit: 42bbadf857ff44e3ae1dbf64efe9b1fdf3743662
Parents: b4698e8
Author: Hitesh Shah <hitesh@apache.org>
Authored: Tue May 7 15:15:02 2013 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Tue May 7 15:15:02 2013 -0700

----------------------------------------------------------------------
 tez-dag/src/main/avro/HistoryEvents.avpr           |    3 ++-
 .../tez/dag/app/dag/impl/TaskAttemptImpl.java      |   14 ++++++++------
 .../org/apache/tez/dag/app/dag/impl/TaskImpl.java  |    4 ++--
 .../history/events/TaskAttemptFinishedEvent.java   |    7 +++++--
 4 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/42bbadf8/tez-dag/src/main/avro/HistoryEvents.avpr
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/avro/HistoryEvents.avpr b/tez-dag/src/main/avro/HistoryEvents.avpr
index 71913b8..3653dcf 100644
--- a/tez-dag/src/main/avro/HistoryEvents.avpr
+++ b/tez-dag/src/main/avro/HistoryEvents.avpr
@@ -106,7 +106,8 @@
           {"name": "vertexName", "type": "string"},
           {"name": "taskAttemptId", "type": "string"},
           {"name": "finishTime", "type": "long"},
-          {"name": "status", "type": "string"}
+          {"name": "status", "type": "string"},
+          {"name": "diagnostics", "type": "string"}
       ]
      },
 

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/42bbadf8/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
index f61c049..6922b44 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
@@ -148,7 +148,7 @@ public class TaskAttemptImpl implements TaskAttempt,
   private final boolean isRescheduled;
 
   private boolean speculatorContainerRequestSent = false;
-  protected String mrxModuleClassName;
+  protected String processorName;
   
   protected static final FailedTransitionHelper FAILED_HELPER =
       new FailedTransitionHelper();
@@ -259,7 +259,7 @@ public class TaskAttemptImpl implements TaskAttempt,
       TezConfiguration conf,
       Token<JobTokenIdentifier> jobToken, Credentials credentials, Clock clock,
       TaskHeartbeatHandler taskHeartbeatHandler, AppContext appContext,
-      String mrxModuleClassName, TaskLocationHint locationHint,
+      String processorName, TaskLocationHint locationHint,
       Resource resource, Map<String, LocalResource> localResources,
       Map<String, String> environment, 
       String javaOpts, boolean isRescheduled) {
@@ -279,7 +279,7 @@ public class TaskAttemptImpl implements TaskAttempt,
     this.appContext = appContext;
     this.taskResource = resource;
     this.reportedStatus = new TaskAttemptStatus();
-    this.mrxModuleClassName = mrxModuleClassName;
+    this.processorName = processorName;
     initTaskAttemptStatus(reportedStatus);
     RackResolver.init(conf);
     this.stateMachine = stateMachineFactory.make(this);
@@ -303,7 +303,7 @@ public class TaskAttemptImpl implements TaskAttempt,
     // TODO  TEZ-50 user and jobname
     return new TezEngineTaskContext(getID(), dag.getUserName(), 
         dag.getName(), getTask()
-        .getVertex().getName(), mrxModuleClassName,
+        .getVertex().getName(), processorName,
         vertex.getInputSpecList(), vertex.getOutputSpecList());
   }
   
@@ -803,7 +803,7 @@ public class TaskAttemptImpl implements TaskAttempt,
     
     TaskAttemptFinishedEvent finishEvt = new TaskAttemptFinishedEvent(
         attemptId, getTask().getVertex().getName(),
-        getFinishTime(), TaskAttemptState.SUCCEEDED);
+        getFinishTime(), TaskAttemptState.SUCCEEDED, "");
     // FIXME how do we store information regd completion events
     eventHandler.handle(new DAGHistoryEvent(
         attemptId.getTaskID().getVertexID().getDAGId(),
@@ -815,7 +815,9 @@ public class TaskAttemptImpl implements TaskAttempt,
       TaskAttemptState state) {
     TaskAttemptFinishedEvent finishEvt = new TaskAttemptFinishedEvent(
         attemptId, getTask().getVertex().getName(),
-        clock.getTime(), state);
+        clock.getTime(), state,
+        StringUtils.join(
+            LINE_SEPARATOR, getDiagnostics()));
     // FIXME how do we store information regd completion events
     eventHandler.handle(new DAGHistoryEvent(
         attemptId.getTaskID().getVertexID().getDAGId(),

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/42bbadf8/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java
index d05f546..e4538aa 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java
@@ -279,7 +279,7 @@ public class TaskImpl implements Task, EventHandler<TaskEvent> {
       // TODO Metrics
       //MRAppMetrics metrics, 
       TaskHeartbeatHandler thh, AppContext appContext,
-      String mrxModuleClassName,
+      String processorName,
       boolean leafVertex, TaskLocationHint locationHint, Resource resource,
       Map<String, LocalResource> localResources,
       Map<String, String> environment,
@@ -307,7 +307,7 @@ public class TaskImpl implements Task, EventHandler<TaskEvent> {
     this.encryptedShuffle = false;
     //conf.getBoolean(MRConfig.SHUFFLE_SSL_ENABLED_KEY,
      //                                       MRConfig.SHUFFLE_SSL_ENABLED_DEFAULT);
-    this.processorName = mrxModuleClassName;
+    this.processorName = processorName;
 
     this.leafVertex = leafVertex;
     this.locationHint = locationHint;

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/42bbadf8/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
index 05d420d..7b5f3a1 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
@@ -31,11 +31,13 @@ public class TaskAttemptFinishedEvent implements HistoryEvent {
   public TaskAttemptFinishedEvent(TezTaskAttemptID taId,
       String vertexName,
       long finishTime,
-      TaskAttemptState state) {
+      TaskAttemptState state,
+      String diagnostics) {
     datum.taskAttemptId = taId.toString();
     datum.vertexName = vertexName;
     datum.finishTime = finishTime;
     datum.status = state.name();
+    datum.diagnostics = diagnostics;
   }
 
   @Override
@@ -59,6 +61,7 @@ public class TaskAttemptFinishedEvent implements HistoryEvent {
     return "vertexName=" + datum.vertexName
         + ", taskAttemptId=" + datum.taskAttemptId
         + ", finishTime=" + datum.finishTime
-        + ", status=" + datum.status;
+        + ", status=" + datum.status
+        + ", diagnostics=" + datum.diagnostics;
   }
 }


Mime
View raw message