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/12/15 12:44:11 UTC

kylin git commit: KYLIN-1226 minor but critical bug fix

Repository: kylin
Updated Branches:
  refs/heads/2.0-rc cd90eaa09 -> bcffcd30c


KYLIN-1226 minor but critical bug fix


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

Branch: refs/heads/2.0-rc
Commit: bcffcd30c8ae3932525cc577353724449c5c67c8
Parents: cd90eaa
Author: Li, Yang <ya...@ebay.com>
Authored: Tue Dec 15 19:44:02 2015 +0800
Committer: Li, Yang <ya...@ebay.com>
Committed: Tue Dec 15 19:44:02 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/bcffcd30/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
index 36de8a9..73f89c1 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
@@ -358,8 +358,9 @@ public class InMemCubeBuilder extends AbstractInMemCubeBuilder {
 
     private CuboidResult updateCuboidResult(long cuboidId, GridTable table, int nRows, long timeSpent, int aggrCacheMB) {
         if (aggrCacheMB <= 0 && baseResult != null) {
-            aggrCacheMB = (int) Math.ceil( //
-                    (DERIVE_AGGR_CACHE_CONSTANT_FACTOR + DERIVE_AGGR_CACHE_VARIABLE_FACTOR * nRows / baseResult.nRows) * baseResult.aggrCacheMB);
+            aggrCacheMB = (int) Math.round( //
+                    (DERIVE_AGGR_CACHE_CONSTANT_FACTOR + DERIVE_AGGR_CACHE_VARIABLE_FACTOR * nRows / baseResult.nRows) //
+                            * baseResult.aggrCacheMB);
         }
 
         CuboidResult result = new CuboidResult(cuboidId, table, nRows, timeSpent, aggrCacheMB);