hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r1672171 - /hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java
Date Wed, 08 Apr 2015 20:41:07 GMT
Author: sseth
Date: Wed Apr  8 20:41:06 2015
New Revision: 1672171

URL: http://svn.apache.org/r1672171
Log:
HIVE-10245. LLAP: Make use of the timed version of getDagStatus in TezJobMonitor. (Siddharth
Seth)

Modified:
    hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java

Modified: hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java?rev=1672171&r1=1672170&r2=1672171&view=diff
==============================================================================
--- hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java (original)
+++ hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java Wed
Apr  8 20:41:06 2015
@@ -254,6 +254,7 @@ public class TezJobMonitor {
    */
   public int monitorExecution(final DAGClient dagClient, HiveTxnManager txnMgr, HiveConf
conf,
       DAG dag) throws InterruptedException {
+    long monitorStartTime = System.currentTimeMillis();
     DAGStatus status = null;
     completed = new HashSet<String>();
     diagnostics = new StringBuffer();
@@ -293,7 +294,7 @@ public class TezJobMonitor {
     while (true) {
 
       try {
-        status = dagClient.getDAGStatus(opts);
+        status = dagClient.getDAGStatus(opts, checkInterval);
         Map<String, Progress> progressMap = status.getVertexProgress();
         DAGStatus.State state = status.getState();
         heartbeater.heartbeat();
@@ -326,6 +327,9 @@ public class TezJobMonitor {
             }
             break;
           case SUCCEEDED:
+            if (!running) {
+              startTime = monitorStartTime;
+            }
             if (inPlaceEligible) {
               printStatusInPlace(progressMap, startTime, false, dagClient);
               // log the progress report to log file as well
@@ -351,6 +355,9 @@ public class TezJobMonitor {
             done = true;
             break;
           case KILLED:
+            if (!running) {
+              startTime = monitorStartTime;
+            }
             if (inPlaceEligible) {
               printStatusInPlace(progressMap, startTime, true, dagClient);
               // log the progress report to log file as well
@@ -363,6 +370,9 @@ public class TezJobMonitor {
             break;
           case FAILED:
           case ERROR:
+            if (!running) {
+              startTime = monitorStartTime;
+            }
             if (inPlaceEligible) {
               printStatusInPlace(progressMap, startTime, true, dagClient);
               // log the progress report to log file as well
@@ -375,9 +385,6 @@ public class TezJobMonitor {
             break;
           }
         }
-        if (!done) {
-          Thread.sleep(checkInterval);
-        }
       } catch (Exception e) {
         console.printInfo("Exception: " + e.getMessage());
         if (++failedCounter % maxRetryInterval / checkInterval == 0



Mime
View raw message