Skip to content

Commit 6e63933

Browse files
committed
HBASE-26340 - fix RegionSizeCalculator getLEngth to bytes instead of converting from MB
1 parent 39a20c5 commit 6e63933

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RegionSizeCalculator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public class RegionSizeCalculator {
5252
private final Map<byte[], Long> sizeMap = new TreeMap<>(Bytes.BYTES_COMPARATOR);
5353

5454
static final String ENABLE_REGIONSIZECALCULATOR = "hbase.regionsizecalculator.enable";
55-
private static final long MEGABYTE = 1024L * 1024L;
5655

5756
/**
5857
* Computes size of each region for table and given column families.
@@ -84,7 +83,7 @@ private void init(RegionLocator regionLocator, Admin admin)
8483

8584
byte[] regionId = regionLoad.getRegionName();
8685
long regionSizeBytes
87-
= ((long) regionLoad.getStoreFileSize().get(Size.Unit.MEGABYTE)) * MEGABYTE;
86+
= (long)regionLoad.getStoreFileSize().get(Size.Unit.BYTE);
8887

8988
sizeMap.put(regionId, regionSizeBytes);
9089

0 commit comments

Comments
 (0)