You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2021/04/13 16:08:41 UTC
[hbase] branch branch-2.3 updated: HBASE-25653 Add units and round
off region size to 2 digits after decimal (#3046)
This is an automated email from the ASF dual-hosted git repository.
ndimiduk pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.3 by this push:
new c060665 HBASE-25653 Add units and round off region size to 2 digits after decimal (#3046)
c060665 is described below
commit c0606652965c7290cd6aed1867b8beabd4d43231
Author: DivyeshChandra <di...@gmail.com>
AuthorDate: Wed Mar 17 10:02:12 2021 +0530
HBASE-25653 Add units and round off region size to 2 digits after decimal (#3046)
Signed-off-by: stack <st...@duboce.net>
Reviewed-by: Viraj Jasani <vj...@apache.org>
---
.../master/normalizer/SimpleRegionNormalizer.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
index f4e4889..dde60ac 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
@@ -313,8 +313,8 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
if (tableDescriptor != null) {
targetRegionCount = tableDescriptor.getNormalizerTargetRegionCount();
targetRegionSize = tableDescriptor.getNormalizerTargetRegionSize();
- LOG.debug("Table {} configured with target region count {}, target region size {}", table,
- targetRegionCount, targetRegionSize);
+ LOG.debug("Table {} configured with target region count {}, target region size {} MB",
+ table, targetRegionCount, targetRegionSize);
}
} catch (IOException e) {
LOG.warn("TableDescriptor for {} unavailable, table-level target region count and size"
@@ -332,8 +332,8 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
} else {
avgRegionSize = totalSizeMb / (double) regionCount;
}
- LOG.debug("Table {}, total aggregated regions size: {} and average region size {}", table,
- totalSizeMb, avgRegionSize);
+ LOG.debug("Table {}, total aggregated regions size: {} MB and average region size {} MB",
+ table, totalSizeMb, String.format("%.3f", avgRegionSize));
}
return avgRegionSize;
@@ -373,7 +373,7 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
}
final double avgRegionSizeMb = ctx.getAverageRegionSizeMb();
- LOG.debug("Computing normalization plan for table {}. average region size: {}, number of"
+ LOG.debug("Computing normalization plan for table {}. average region size: {} MB, number of"
+ " regions: {}.", ctx.getTableName(), avgRegionSizeMb, ctx.getTableRegions().size());
final List<NormalizationPlan> plans = new ArrayList<>();
@@ -418,7 +418,8 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
*/
private List<NormalizationPlan> computeSplitNormalizationPlans(final NormalizeContext ctx) {
final double avgRegionSize = ctx.getAverageRegionSizeMb();
- LOG.debug("Table {}, average region size: {}", ctx.getTableName(), avgRegionSize);
+ LOG.debug("Table {}, average region size: {} MB", ctx.getTableName(),
+ String.format("%.3f", avgRegionSize));
final List<NormalizationPlan> plans = new ArrayList<>();
for (final RegionInfo hri : ctx.getTableRegions()) {
@@ -427,8 +428,9 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
}
final long regionSize = getRegionSizeMB(hri);
if (regionSize > 2 * avgRegionSize) {
- LOG.info("Table {}, large region {} has size {}, more than twice avg size {}, splitting",
- ctx.getTableName(), hri.getRegionNameAsString(), regionSize, avgRegionSize);
+ LOG.info("Table {}, large region {} has size {} MB, more than twice avg size {} MB, splitting",
+ ctx.getTableName(), hri.getRegionNameAsString(), regionSize,
+ String.format("%.3f", avgRegionSize));
plans.add(new SplitNormalizationPlan(hri));
}
}