tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject [14/50] [abbrv] tez git commit: TEZ-1969. Stop the DAGAppMaster when a local mode client is stopped (pramachandran)
Date Fri, 24 Apr 2015 00:26:08 GMT
TEZ-1969. Stop the DAGAppMaster when a local mode client is stopped (pramachandran)


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

Branch: refs/heads/TEZ-2003
Commit: 3e6fc355c618b77531f7d29b6a1c9cbc3c39456a
Parents: e196868
Author: Prakash Ramachandran <pramachandran@hortonworks.com>
Authored: Fri Apr 17 07:54:43 2015 +0530
Committer: Prakash Ramachandran <pramachandran@hortonworks.com>
Committed: Fri Apr 17 07:54:43 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 .../src/main/java/org/apache/tez/client/LocalClient.java    | 9 +++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/3e6fc355/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ce9bfe8..1a7609f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,6 +9,7 @@ INCOMPATIBLE CHANGES
   TEZ-1993. Implement a pluggable InputSizeEstimator for grouping fairly
 
 ALL CHANGES:
+  TEZ-1969. Stop the DAGAppMaster when a local mode client is stopped
   TEZ-714. OutputCommitters should not run in the main AM dispatcher thread
   TEZ-2323. Fix TestOrderedWordcount to use MR memory configs.
   TEZ-1482. Fix memory issues for Local Mode running concurrent tasks

http://git-wip-us.apache.org/repos/asf/tez/blob/3e6fc355/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java b/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
index b5889a9..6eb58bd 100644
--- a/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
+++ b/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
@@ -106,6 +106,14 @@ public class LocalClient extends FrameworkClient {
   public void close() throws IOException {
     // LocalClients are shared between TezClient and DAGClients, which can cause stop / start
/ close
     // to be invoked multiple times. If modifying these methods - this should be factored
in.
+
+    // Multiple DAGClient's can reuse the LocalClient (for ex session). However there is
only a
+    // single instance of LocalClient for a TezClient, and dagAppMaster can be cleaned up
when
+    // the TezClient is stopped, in order not to leak.
+    if (dagAppMaster != null) {
+      dagAppMaster.stop();
+      dagAppMaster = null;
+    }
   }
 
   @Override
@@ -309,6 +317,7 @@ public class LocalClient extends FrameworkClient {
           LOG.error("Error starting DAGAppMaster", t);
           if (dagAppMaster != null) {
             dagAppMaster.stop();
+            dagAppMaster = null;
           }
           amFailException = t;
         }


Mime
View raw message