HBASE-15933 Addendum - make merge decision when sizes of both regions are known

This commit is contained in:
tedyu 2016-06-02 09:30:36 -07:00
parent 9593a9f396
commit cd2588001c
1 changed files with 1 additions and 1 deletions

View File

@ -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");