kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [33/67] [abbrv] kylin git commit: #732 catch and cache ResourceLimitExceededException
Date Mon, 05 Jun 2017 05:23:21 GMT
#732 catch and cache ResourceLimitExceededException


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

Branch: refs/heads/master
Commit: 6bfc6d286de0d8d2fcec43cf655fee7030b18d84
Parents: 87d5d8d
Author: Roger Shi <rogershijicheng@hotmail.com>
Authored: Sat May 27 11:06:29 2017 +0800
Committer: hongbin ma <ma@kyligence.io>
Committed: Sat May 27 16:41:52 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/service/QueryService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/6bfc6d28/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java b/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
index 33fb614..61ddbb0 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
@@ -48,6 +48,7 @@ import javax.sql.DataSource;
 import org.apache.calcite.avatica.ColumnMetaData.Rep;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Put;
@@ -437,7 +438,7 @@ public class QueryService extends BasicService {
                 sqlResponse.setTotalScanCount(queryContext.getScannedRows());
                 sqlResponse.setTotalScanBytes(queryContext.getScannedBytes());
 
-                if (queryCacheEnabled && e.getCause() != null && e.getCause()
instanceof ResourceLimitExceededException) {
+                if (queryCacheEnabled && e.getCause() != null && ExceptionUtils.getRootCause(e)
instanceof ResourceLimitExceededException) {
                     Cache exceptionCache = cacheManager.getCache(EXCEPTION_QUERY_CACHE);
                     exceptionCache.put(new Element(sqlRequest, sqlResponse));
                 }


Mime
View raw message