tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbalamo...@apache.org
Subject git commit: TEZ-1641. Add debug logs in VertexManager to help debugging custom VertexManagerPlugins
Date Thu, 09 Oct 2014 23:10:14 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.5 eea4cea4e -> 847a45a73


TEZ-1641. Add debug logs in VertexManager to help debugging custom VertexManagerPlugins


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

Branch: refs/heads/branch-0.5
Commit: 847a45a7301ca0aaa424e3560487399b30e60b4c
Parents: eea4cea
Author: Rajesh Balamohan <rbalamohan@apache.org>
Authored: Fri Oct 10 04:30:54 2014 +0530
Committer: Rajesh Balamohan <rbalamohan@apache.org>
Committed: Fri Oct 10 04:39:52 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/tez/dag/app/dag/impl/VertexManager.java  | 12 ++++++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/847a45a7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f6f841e..a88899b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@ ALL CHANGES:
   TEZ-1634. Fix compressed IFile shuffle errors
   TEZ-1648. Update website after 0.5.1
   TEZ-1614. Use setFromConfiguration() in SortMergeJoinExample to demonstrate the usage
+  TEZ-1641. Add debug logs in VertexManager to help debugging custom VertexManagerPlugins
 
 Release 0.5.1: 2014-10-02
 

http://git-wip-us.apache.org/repos/asf/tez/blob/847a45a7/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
index c2ff660..8579064 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
@@ -28,6 +28,8 @@ import java.util.concurrent.ConcurrentHashMap;
 
 import javax.annotation.Nullable;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.yarn.api.records.Container;
 import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.tez.common.ReflectionUtils;
@@ -70,6 +72,8 @@ public class VertexManager {
   AppContext appContext;
   ConcurrentHashMap<String, List<TezEvent>> cachedRootInputEventMap;
 
+  private static final Log LOG = LogFactory.getLog(VertexManager.class);
+
   class VertexManagerPluginContextImpl implements VertexManagerPluginContext {
     // TODO Add functionality to allow VertexManagers to send VertexManagerEvents
 
@@ -143,6 +147,10 @@ public class VertexManager {
             }
           });
 
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("vertex:" + managedVertex.getName() + "; Added " + events.size() + " for
input " +
+                "name " + inputName);
+      }
       cachedRootInputEventMap.put(inputName,Lists.newArrayList(tezEvents));
       // Recovery handling is taken care of by the Vertex.
     }
@@ -259,6 +267,10 @@ public class VertexManager {
   public List<TezEvent> onRootVertexInitialized(String inputName,
       InputDescriptor inputDescriptor, List<Event> events) {
     plugin.onRootVertexInitialized(inputName, inputDescriptor, events);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("vertex:" + managedVertex.getName() + "; For input name "
+          + inputName + " task events size is " + cachedRootInputEventMap.get(inputName).size());
+    }
     return cachedRootInputEventMap.get(inputName);
   }
 }


Mime
View raw message