You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2014/03/19 05:29:09 UTC

git commit: TEZ-947. Fix OrderedWordCount job progress reporting to work across AM attempts. (hitesh)

Repository: incubator-tez
Updated Branches:
  refs/heads/master 8d87e0398 -> 69b2b53a5


TEZ-947. Fix OrderedWordCount job progress reporting to work across AM attempts. (hitesh)


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

Branch: refs/heads/master
Commit: 69b2b53a57c8366017a4a5df14bf83dd122c7dc9
Parents: 8d87e03
Author: Hitesh Shah <hi...@apache.org>
Authored: Tue Mar 18 21:28:30 2014 -0700
Committer: Hitesh Shah <hi...@apache.org>
Committed: Tue Mar 18 21:28:30 2014 -0700

----------------------------------------------------------------------
 .../apache/tez/mapreduce/examples/OrderedWordCount.java  | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/69b2b53a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/OrderedWordCount.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/OrderedWordCount.java b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/OrderedWordCount.java
index a9349e5..93a3a48 100644
--- a/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/OrderedWordCount.java
+++ b/tez-mapreduce-examples/src/main/java/org/apache/tez/mapreduce/examples/OrderedWordCount.java
@@ -466,7 +466,7 @@ public class OrderedWordCount {
 
         while (true) {
           dagStatus = dagClient.getDAGStatus(statusGetOpts);
-          if(dagStatus.getState() == DAGStatus.State.RUNNING ||
+          if (dagStatus.getState() == DAGStatus.State.RUNNING ||
               dagStatus.getState() == DAGStatus.State.SUCCEEDED ||
               dagStatus.getState() == DAGStatus.State.FAILED ||
               dagStatus.getState() == DAGStatus.State.KILLED ||
@@ -481,9 +481,14 @@ public class OrderedWordCount {
         }
 
 
-        while (dagStatus.getState() == DAGStatus.State.RUNNING) {
-          try {
+        while (dagStatus.getState() != DAGStatus.State.SUCCEEDED &&
+            dagStatus.getState() != DAGStatus.State.FAILED &&
+            dagStatus.getState() != DAGStatus.State.KILLED &&
+            dagStatus.getState() != DAGStatus.State.ERROR) {
+          if (dagStatus.getState() == DAGStatus.State.RUNNING) {
             ExampleDriver.printDAGStatus(dagClient, vNames);
+          }
+          try {
             try {
               Thread.sleep(1000);
             } catch (InterruptedException e) {