kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [19/50] [abbrv] incubator-kylin git commit: KYLIN-965 keep default setting for small/medium/large cubes
Date Fri, 18 Sep 2015 23:46:55 GMT
KYLIN-965 keep default setting for small/medium/large cubes

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

Branch: refs/heads/master
Commit: c9f819e1de326ef343e4d576535d9080ddd518a2
Parents: 50e0875
Author: shaofengshi <shaofengshi@apache.org>
Authored: Mon Sep 7 09:03:35 2015 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Mon Sep 7 09:03:35 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kylin/common/KylinConfig.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/c9f819e1/common/src/main/java/org/apache/kylin/common/KylinConfig.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/KylinConfig.java b/common/src/main/java/org/apache/kylin/common/KylinConfig.java
index 59337d8..5566fa2 100644
--- a/common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -658,7 +658,18 @@ public class KylinConfig {
     
     public int getHBaseRegionSizeGB(String capacity) {
         String key = HBASE_REGION_SIZE + "." + capacity.toLowerCase();
-        return Integer.valueOf(getOptional(key, "10"));
+
+        int cut = 20;
+        if (kylinConfig.containsKey(key)) {
+            cut = kylinConfig.getInt(key);
+        } else if ("small".equalsIgnoreCase(capacity)) {
+            cut = 10;
+        } else if ("medium".equalsIgnoreCase(capacity)) {
+            cut = 20;
+        } else if ("large".equalsIgnoreCase(capacity)) {
+            cut = 100;
+        }
+        return cut;
     }
     
     public int getHBaseMaxRegionCount() {


Mime
View raw message