hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pxi...@apache.org
Subject hive git commit: HIVE-16385: StatsNoJobTask could exit early before all partitions have been processed (Chao Sun, reviewed by Xuefu Zhang)
Date Thu, 20 Apr 2017 18:42:34 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2 84483e7da -> c089e9d45


HIVE-16385: StatsNoJobTask could exit early before all partitions have been processed (Chao
Sun, reviewed by Xuefu Zhang)


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

Branch: refs/heads/branch-2
Commit: c089e9d45516b60ba9460dba72127de68a48d46f
Parents: 84483e7
Author: Chao Sun <sunchao@apache.org>
Authored: Wed Apr 5 11:28:25 2017 -0700
Committer: Pengcheng Xiong <pxiong@hortonworks.com>
Committed: Thu Apr 20 11:42:25 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hive/ql/exec/StatsNoJobTask.java   | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/c089e9d4/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsNoJobTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsNoJobTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsNoJobTask.java
index f5d2163..9c3a664 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsNoJobTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsNoJobTask.java
@@ -345,14 +345,15 @@ public class StatsNoJobTask extends Task<StatsNoJobWork> implements
Serializable
     try {
 
       // Wait a while for existing tasks to terminate
-      if (!threadPool.awaitTermination(100, TimeUnit.SECONDS)) {
-        // Cancel currently executing tasks
-        threadPool.shutdownNow();
+      while (!threadPool.awaitTermination(10, TimeUnit.SECONDS)) {
+        LOG.debug("Waiting for all stats tasks to finish...");
+      }
+      // Cancel currently executing tasks
+      threadPool.shutdownNow();
 
-        // Wait a while for tasks to respond to being cancelled
-        if (!threadPool.awaitTermination(100, TimeUnit.SECONDS)) {
-          LOG.debug("Stats collection thread pool did not terminate");
-        }
+      // Wait a while for tasks to respond to being cancelled
+      if (!threadPool.awaitTermination(100, TimeUnit.SECONDS)) {
+        LOG.debug("Stats collection thread pool did not terminate");
       }
     } catch (InterruptedException ie) {
 


Mime
View raw message