You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/02/16 03:42:50 UTC

[5/5] kylin git commit: minor, add back query level scan threshold

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
Commit: 7564274c369abb86860799ba64f4ace609d4140f
Parents: 344c707
Author: Hongbin Ma <ma...@apache.org>
Authored: Thu Feb 16 10:41:52 2017 +0800
Committer: Hongbin Ma <ma...@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();
     }