You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/04/29 03:52:20 UTC
kylin git commit: KYLIN-1323 fix bug in
RangeKeyDistributionReducer.java
Repository: kylin
Updated Branches:
refs/heads/master b345cf60a -> 3ba180a4e
KYLIN-1323 fix bug in RangeKeyDistributionReducer.java
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3ba180a4
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3ba180a4
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3ba180a4
Branch: refs/heads/master
Commit: 3ba180a4e46bf1d799c16b56b83398b3d2e7b59f
Parents: b345cf6
Author: shaofengshi <sh...@apache.org>
Authored: Fri Apr 29 09:51:56 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Fri Apr 29 09:52:10 2016 +0800
----------------------------------------------------------------------
.../kylin/storage/hbase/steps/RangeKeyDistributionReducer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/3ba180a4/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RangeKeyDistributionReducer.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RangeKeyDistributionReducer.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RangeKeyDistributionReducer.java
index 567dd89..f9dfa49 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RangeKeyDistributionReducer.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RangeKeyDistributionReducer.java
@@ -62,7 +62,7 @@ public class RangeKeyDistributionReducer extends KylinReducer<Text, LongWritable
}
if (context.getConfiguration().get(BatchConstants.CFG_HFILE_SIZE_GB) != null) {
- hfileSizeGB = Integer.valueOf(context.getConfiguration().get(BatchConstants.CFG_HFILE_SIZE_GB));
+ hfileSizeGB = Float.valueOf(context.getConfiguration().get(BatchConstants.CFG_HFILE_SIZE_GB)).intValue();
}
if (context.getConfiguration().get(BatchConstants.CFG_REGION_SPLIT_SIZE) != null) {
@@ -108,7 +108,7 @@ public class RangeKeyDistributionReducer extends KylinReducer<Text, LongWritable
if (hfileSizeGB <= 0) {
hfileSizeGB = gbPerRegion;
}
- int hfilePerRegion = gbPerRegion / hfileSizeGB;
+ int hfilePerRegion = (int) (gbPerRegion / hfileSizeGB);
hfilePerRegion = Math.max(1, hfilePerRegion);
System.out.println(nRegion + " regions");