HBASE-15933 Addendum - make merge decision when sizes of both regions are known
This commit is contained in:
parent
9593a9f396
commit
cd2588001c
|
@ -182,7 +182,7 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
|
|||
if (mergeEnabled) {
|
||||
HRegionInfo hri2 = tableRegions.get(candidateIdx+1);
|
||||
long regionSize2 = getRegionSize(hri2);
|
||||
if (regionSize + regionSize2 < avgRegionSize) {
|
||||
if (regionSize > 0 && regionSize2 > 0 && regionSize + regionSize2 < avgRegionSize) {
|
||||
LOG.info("Table " + table + ", small region size: " + regionSize
|
||||
+ " plus its neighbor size: " + regionSize2
|
||||
+ ", less than the avg size " + avgRegionSize + ", merging them");
|
||||
|
|
Loading…
Reference in New Issue