You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2016/01/14 11:35:34 UTC
[2/3] kylin git commit: KYLIN-1297 avoid unnecessary converter
creation
KYLIN-1297 avoid unnecessary converter creation
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b4ea1b39
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b4ea1b39
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b4ea1b39
Branch: refs/heads/2.x-staging
Commit: b4ea1b3915c70daf44a871a39d65282e9089b77c
Parents: 32cb630
Author: honma <ho...@ebay.com>
Authored: Thu Jan 14 18:34:35 2016 +0800
Committer: honma <ho...@ebay.com>
Committed: Thu Jan 14 18:34:35 2016 +0800
----------------------------------------------------------------------
.../storage/hbase/cube/v2/SequentialCubeTupleIterator.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/b4ea1b39/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
index 7e70a4d..dcc3aba 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
@@ -56,6 +56,7 @@ public class SequentialCubeTupleIterator implements ITupleIterator {
@Override
public boolean hasNext() {
+ logger.info("hasNext called");
if (next != null)
return true;
@@ -75,7 +76,10 @@ public class SequentialCubeTupleIterator implements ITupleIterator {
if (scannerIterator.hasNext()) {
curScanner = scannerIterator.next();
curRecordIterator = curScanner.iterator();
- curTupleConverter = new CubeTupleConverter(curScanner.cubeSeg, cuboid, selectedDimensions, selectedMetrics, tupleInfo);
+ if (curRecordIterator.hasNext()) {
+ //if the segment does not has any tuples, don't bother to create a converter
+ curTupleConverter = new CubeTupleConverter(curScanner.cubeSeg, cuboid, selectedDimensions, selectedMetrics, tupleInfo);
+ }
} else {
return false;
}