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 2015/06/24 10:15:26 UTC

incubator-kylin git commit: minor, fix CI

Repository: incubator-kylin
Updated Branches:
  refs/heads/0.8 13958713f -> fae3d28f4


minor, fix CI


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

Branch: refs/heads/0.8
Commit: fae3d28f4d05089a0ef4be1791f266e372c33d9c
Parents: 1395871
Author: Li, Yang <ya...@ebay.com>
Authored: Wed Jun 24 16:15:13 2015 +0800
Committer: Li, Yang <ya...@ebay.com>
Committed: Wed Jun 24 16:15:13 2015 +0800

----------------------------------------------------------------------
 .../job/inmemcubing/DoggedCubeBuilder.java      | 30 +++++++++-----------
 1 file changed, 14 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/fae3d28f/job/src/main/java/org/apache/kylin/job/inmemcubing/DoggedCubeBuilder.java
----------------------------------------------------------------------
diff --git a/job/src/main/java/org/apache/kylin/job/inmemcubing/DoggedCubeBuilder.java b/job/src/main/java/org/apache/kylin/job/inmemcubing/DoggedCubeBuilder.java
index c451692..dc7c695 100644
--- a/job/src/main/java/org/apache/kylin/job/inmemcubing/DoggedCubeBuilder.java
+++ b/job/src/main/java/org/apache/kylin/job/inmemcubing/DoggedCubeBuilder.java
@@ -187,9 +187,9 @@ public class DoggedCubeBuilder extends AbstractInMemCubeBuilder {
             int systemAvailMB = MemoryBudgetController.getSystemAvailMB();
             int nSplit = splits.size();
             long splitRowCount = nSplit == 0 ? 0 : splits.get(nSplit - 1).inputRowCount;
-            
+
             logger.debug(splitRowCount + " records went into split #" + nSplit + "; " + systemAvailMB + " MB left, " + reserveMemoryMB + " MB threshold");
-            
+
             return splitRowCount >= splitRowThreshold || systemAvailMB <= reserveMemoryMB;
         }
     }
@@ -296,7 +296,7 @@ public class DoggedCubeBuilder extends AbstractInMemCubeBuilder {
                     metrics = getMetricsValues(slot.record);
                     reuseAggrs.aggregate(metrics);
                 } while (smallest.isSameKey(heap.peek()));
-                
+
                 reuseAggrs.collectStates(metrics);
                 setMetricsValues(smallest.record, metrics);
             }
@@ -383,25 +383,23 @@ public class DoggedCubeBuilder extends AbstractInMemCubeBuilder {
             long cuboidComp = this.cuboidId - o.cuboidId;
             if (cuboidComp != 0)
                 return cuboidComp < 0 ? -1 : 1;
-            else
-                return this.record.compareTo(o.record);
-        }
-
-        public boolean isSameKey(MergeSlot o) {
-            if (o == null)
-                return false;
-
-            if (this.cuboidId != o.cuboidId)
-                return false;
 
             // note GTRecord.equals() don't work because the two GTRecord comes from different GridTable
             ImmutableBitSet pk = this.record.getInfo().getPrimaryKey();
             for (int i = 0; i < pk.trueBitCount(); i++) {
                 int c = pk.trueBitAt(i);
-                if (this.record.get(c).equals(o.record.get(c)) == false)
-                    return false;
+                int comp = this.record.get(c).compareTo(o.record.get(c));
+                if (comp != 0)
+                    return comp;
             }
-            return true;
+            return 0;
+        }
+
+        public boolean isSameKey(MergeSlot o) {
+            if (o == null)
+                return false;
+            else
+                return this.compareTo(o) == 0;
         }
 
     };