tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject [05/37] tez git commit: TEZ-2362. State Change Notifier Thread should be stopped when dag is completed (bikas)
Date Tue, 28 Apr 2015 20:40:46 GMT
TEZ-2362. State Change Notifier Thread should be stopped when dag is completed (bikas)


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

Branch: refs/heads/TEZ-2003
Commit: 47773a749cd9ab7ea169e4eba22ad5e5ce8f4bc3
Parents: 2935ef4
Author: Bikas Saha <bikas@apache.org>
Authored: Mon Apr 27 10:11:36 2015 -0700
Committer: Bikas Saha <bikas@apache.org>
Committed: Mon Apr 27 10:11:36 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                          |  2 ++
 .../org/apache/tez/dag/app/dag/impl/DAGImpl.java     |  3 ++-
 .../org/apache/tez/dag/app/dag/impl/TestDAGImpl.java | 15 +++++++++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/47773a74/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 92c1f6e..a8cdd79 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,6 +9,8 @@ INCOMPATIBLE CHANGES
   TEZ-1993. Implement a pluggable InputSizeEstimator for grouping fairly
 
 ALL CHANGES:
+  TEZ-2362. State Change Notifier Thread should be stopped when dag is
+  completed
   TEZ-2364. Resolve config parameter replacement on the client, before sending them to the
AM.
   TEZ-2298. Avoid logging full exception trace in TaskRunner when it's not the main error
reason and is ignored.
   TEZ-2248. VertexImpl/DAGImpl.checkForCompletion have too many termination cause checks

http://git-wip-us.apache.org/repos/asf/tez/blob/47773a74/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
index f8cd10f..5540285 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
@@ -35,7 +35,6 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.Condition;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantLock;
@@ -1256,6 +1255,8 @@ public class DAGImpl implements org.apache.tez.dag.app.dag.DAG,
     if (finishTime == 0) {
       setFinishTime();
     }
+    
+    entityUpdateTracker.stop();
 
     boolean recoveryError = false;
 

http://git-wip-us.apache.org/repos/asf/tez/blob/47773a74/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
index 228d6b8..ba40146 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGImpl.java
@@ -841,7 +841,22 @@ public class TestDAGImpl {
     dispatcher.stop();
     execService.shutdownNow();
     dagPlan = null;
+    if (dag != null) {
+      dag.entityUpdateTracker.stop();
+    }
+    if (mrrDag != null) {
+      mrrDag.entityUpdateTracker.stop();
+    }
+    if (groupDag != null) {
+      groupDag.entityUpdateTracker.stop();
+    }
+    if (dagWithCustomEdge != null) {
+      dagWithCustomEdge.entityUpdateTracker.stop();
+    }
     dag = null;
+    mrrDag = null;
+    groupDag = null;
+    dagWithCustomEdge = null;
   }
 
   private class AMSchedulerEventHandler implements EventHandler<AMSchedulerEvent> {


Mime
View raw message