kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [4/5] kylin git commit: KYLIN-1226 minor but critical bug fix
Date Thu, 17 Dec 2015 08:30:52 GMT
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/4931d231
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4931d231
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4931d231

Branch: refs/heads/2.x-staging
Commit: 4931d231b20ae673b1f6ee581cc064109fdca7c1
Parents: fbc4001
Author: Li, Yang <yangli9@ebay.com>
Authored: Tue Dec 15 19:44:02 2015 +0800
Committer: Yang Li <liyang@apache.org>
Committed: Thu Dec 17 16:25:11 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/4931d231/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 8293756..575583f 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
@@ -355,8 +355,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);


Mime
View raw message