tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-1192. Fix loop termination in TezChild. Contributed by Oleg Zhurakousky.
Date Tue, 10 Jun 2014 17:46:23 GMT
Repository: incubator-tez
Updated Branches:
  refs/heads/master 75dea57f3 -> d77a2255a


TEZ-1192. Fix loop termination in TezChild. Contributed by Oleg
Zhurakousky.


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

Branch: refs/heads/master
Commit: d77a2255a4ec86cf12bc28599b27d7fa33b7f19a
Parents: 75dea57
Author: Siddharth Seth <sseth@apache.org>
Authored: Tue Jun 10 10:45:36 2014 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Tue Jun 10 10:45:36 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/tez/runtime/task/TezChild.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/d77a2255/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java b/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
index 01abdc8..f9e9f6f 100644
--- a/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
+++ b/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
@@ -160,7 +160,7 @@ public class TezChild {
       }
     });
   }
-
+  
   void run() throws IOException, InterruptedException, TezException {
 
     ContainerContext containerContext = new ContainerContext(containerIdString);
@@ -172,7 +172,7 @@ public class TezChild {
 
     UserGroupInformation childUGI = null;
 
-    while (true) {
+    while (!executor.isTerminated()) {
       if (taskCount > 0) {
         TezUtils.updateLoggers("");
       }
@@ -193,6 +193,7 @@ public class TezChild {
       if (containerTask.shouldDie()) {
         LOG.info("ContainerTask returned shouldDie=true, Exiting");
         shutdown();
+        return;
       } else {
         String loggerAddend = containerTask.getTaskSpec().getTaskAttemptID().toString();
         taskCount++;
@@ -213,6 +214,7 @@ public class TezChild {
           if (shouldDie) {
             LOG.info("Got a shouldDie notification via hearbeats. Shutting down");
             shutdown();
+            return;
           }
         } catch (IOException e) {
           handleError(e);


Mime
View raw message