carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [1/2] incubator-carbondata git commit: [CARBONDATA-560] In QueryExecutionException, can not use executorService.shutdownNow() to shut down immediately.
Date Mon, 26 Dec 2016 08:34:43 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 2ee23acf4 -> 37dc0fb6d


[CARBONDATA-560] In QueryExecutionException, can not use executorService.shutdownNow() to
shut down immediately.

In QueryExecutionException, can not use executorService.shutdownNow() to shut down immediately.

fix compilation error

fix QueryExecutionException processing


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

Branch: refs/heads/master
Commit: d9fc651fdbe377b47f26efa98a8ba3e89762719d
Parents: 2ee23ac
Author: Liang Chen <chenliang613@apache.org>
Authored: Sat Dec 24 17:10:56 2016 +0800
Committer: jackylk <jacky.likun@huawei.com>
Committed: Mon Dec 26 16:34:04 2016 +0800

----------------------------------------------------------------------
 .../carbondata/scan/executor/impl/AbstractQueryExecutor.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d9fc651f/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
b/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
index df04dae..f6df175 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
@@ -25,6 +25,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
@@ -470,7 +471,12 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E>
{
    */
   @Override public void finish() throws QueryExecutionException {
     if (null != queryProperties.executorService) {
-      queryProperties.executorService.shutdownNow();
+      queryProperties.executorService.shutdown();
+      try {
+        queryProperties.executorService.awaitTermination(1, TimeUnit.HOURS);
+      } catch (InterruptedException e) {
+        throw new QueryExecutionException(e);
+      }
     }
   }
 


Mime
View raw message