kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [5/7] kylin git commit: minor, add back query level scan threshold
Date Thu, 16 Feb 2017 03:50:47 GMT
minor, add back query level scan threshold


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

Branch: refs/heads/yang22-hbase1.x
Commit: 7564274c369abb86860799ba64f4ace609d4140f
Parents: 344c707
Author: Hongbin Ma <mahongbin@apache.org>
Authored: Thu Feb 16 10:41:52 2017 +0800
Committer: Hongbin Ma <mahongbin@apache.org>
Committed: Thu Feb 16 10:41:52 2017 +0800

----------------------------------------------------------------------
 .../kylin/storage/gtrecord/SequentialCubeTupleIterator.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/7564274c/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SequentialCubeTupleIterator.java
----------------------------------------------------------------------
diff --git a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SequentialCubeTupleIterator.java
b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SequentialCubeTupleIterator.java
index 49080d6..db56ce6 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SequentialCubeTupleIterator.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SequentialCubeTupleIterator.java
@@ -33,6 +33,7 @@ import org.apache.kylin.metadata.tuple.ITuple;
 import org.apache.kylin.metadata.tuple.ITupleIterator;
 import org.apache.kylin.metadata.tuple.TupleInfo;
 import org.apache.kylin.storage.StorageContext;
+import org.apache.kylin.storage.exception.ScanOutOfLimitException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -136,6 +137,11 @@ public class SequentialCubeTupleIterator implements ITupleIterator {
 
     @Override
     public boolean hasNext() {
+
+        if (scanCount >= context.getThreshold()) {
+            throw new ScanOutOfLimitException("Scan row count exceeded threshold at query
level: " + context.getThreshold() + ", please add filter condition to narrow down backend
scan range, like where clause.");
+        }
+        
         return tupleIterator.hasNext();
     }
 


Mime
View raw message